blob: 8658a4cda5bf0590d40641a7f3f1d0867574cd65 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# 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"
|