Commit b907c8b1 authored by Natanael Copa's avatar Natanael Copa

testing/lua5.2-posix: merged with lua-posix

parent f357d146
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_luaver=5.2
pkgname=lua$_luaver-posix
_name=luaposix
pkgver=5.1.28
pkgrel=0
pkgdesc="POSIX library for Lua $_luaver"
url="https://github.com/luaposix/luaposix"
arch="all"
license="MIT"
depends=""
makedepends="lua$_luaver-dev perl ncurses-dev"
source="luaposix-$pkgver.tar.gz::https://github.com/luaposix/luaposix/archive/release-v$pkgver.tar.gz"
replaces="luaposix"
subpackages="lua$_luaver-curses $pkgname-doc"
_builddir="$srcdir"/$_name-release-v$pkgver
_lualib=/usr/lib/lua/$_luaver
_luashare=/usr/share/lua/$_luaver
prepare() {
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
cd "$_builddir"
LUA=lua5.2 LUA_INCLUDE=$(pkg-config lua5.2 --cflags) \
./configure --prefix=/usr \
--libdir=$_lualib \
--datadir=$_luashare \
|| return 1
make || return 1
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
rm "$pkgdir"/usr/lib/lua/*/*.la || return 1
}
curses() {
pkgdesc="ncurses binding for Lua"
replaces="curses"
mkdir -p "$subpkgdir"/$_lualib "$subpkgdir"/$_luashare
mv "$pkgdir"/$_lualib/curses* "$subpkgdir"/$_lualib/ || return 1
mv "$pkgdir"/$_luashare/curses* "$subpkgdir"/$_luashare/ || return 1
}
md5sums="f543b8cc4fae5379ad8ed9cc1cfc2efc luaposix-5.1.28.tar.gz"
sha256sums="d82a322cb93d25ef16ba2cbab79f6fa1d94806249542d771c2c89a5f9cc4345f luaposix-5.1.28.tar.gz"
sha512sums="1ac95ea831d2eb81aec63f316335cea71c7435d06ad830c95f972ea87893b210dd7c684ca3da42111d02420e474dbfca20d7eb47db16ac096af8fff0f7fbc36f luaposix-5.1.28.tar.gz"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment