aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-zlib
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-05-10 18:33:24 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-05-10 18:33:24 +0300
commitb4d9865b4a688624679d5aa1d633b755db34c9e5 (patch)
treec96d13f95a13584c53b020326de5e8892a2d16c1 /main/lua-zlib
parent7eb1016cfd212fb8b0e7574eca049e5bfa6f9803 (diff)
downloadaports-b4d9865b4a688624679d5aa1d633b755db34c9e5.tar.bz2
aports-b4d9865b4a688624679d5aa1d633b755db34c9e5.tar.xz
main/lua-zlib: upgrade to 0.4.1 and build for lua 5.1 and 5.2
Diffstat (limited to 'main/lua-zlib')
-rw-r--r--main/lua-zlib/APKBUILD58
1 files changed, 44 insertions, 14 deletions
diff --git a/main/lua-zlib/APKBUILD b/main/lua-zlib/APKBUILD
index 4ae90bd9ad..9de2223549 100644
--- a/main/lua-zlib/APKBUILD
+++ b/main/lua-zlib/APKBUILD
@@ -1,36 +1,66 @@
# Contributor:
# Maintainer:
+
+_luaversions="5.1 5.2"
+
pkgname=lua-zlib
_name=lzlib
-pkgver=0.4
-_ver=$pkgver-work2
-pkgrel=2
+pkgver=0.4.1
+pkgrel=0
pkgdesc="Lua bindings to the ZLib compression library"
-url="http://luaforge.net/projects/lzlib/"
+url="https://github.com/LuaDist/lzlib"
arch="all"
license="MIT"
-depends="lua"
-makedepends="lua-dev zlib-dev"
-install=
+depends="lua5.1-zlib"
+makedepends="zlib-dev"
subpackages=
-source="http://luaforge.net/frs/download.php/3826/lzlib-$_ver.tar.gz"
+for _i in $_luaversions; do
+ makedepends="$makedepends lua$_i-dev"
+ subpackages="$subpackages lua$_i-zlib:_zlib_${_i/./_}"
+done
+install=
+source="$pkgname-$pkgver.tar.gz::https://github.com/LuaDist/$_name/archive/$pkgver.tar.gz"
-_builddir="$srcdir"/$_name-$_ver
+_builddir="$srcdir"/$_name-$pkgver
prepare() {
cd "$_builddir"
# apply patches here
+ for _i in $_luaversions; do
+ cp -a "$_builddir" "$srcdir"/build-$_i || return 1
+ done
}
build() {
cd "$_builddir"
- make || return 1
+ for _i in $_luaversions; do
+ cd "$srcdir"/build-$_i
+ msg "build for Lua $_i"
+ make \
+ CFLAGS="$CFLAGS $(pkg-config --cflags lua$_i)" \
+ LDFLAGS="$LDFLAGS $(pkg-config --libs lua$_i)" \
+ || return 1
+ done
}
package() {
- cd "$_builddir"
- install -Dm755 zlib.so "$pkgdir"/usr/lib/lua/5.1/zlib.so
- install -Dm644 gzip.lua "$pkgdir"/usr/share/lua/5.1/gzip.lua
+ mkdir -p "$pkgdir"
}
-md5sums="9d29ec26d3ccbd86ea4d95dcc602911a lzlib-0.4-work2.tar.gz"
+_split_zlib() {
+ local _ver=$1
+ pkgdesc="$pkgdesc for Lua $_ver"
+ depends=""
+
+ cd "$srcdir"/build-$_ver
+ install -Dm755 zlib.so "$subpkgdir"/usr/lib/lua/$_ver/zlib.so
+ install -Dm644 gzip.lua "$subpkgdir"/usr/share/lua/$_ver/gzip.lua
+}
+
+for _i in $_luaversions; do
+ eval "_zlib_${_i/./_}() { _split_zlib $_i; }"
+done
+
+md5sums="347878905c0d9e893c7bd81b82668c97 lua-zlib-0.4.1.tar.gz"
+sha256sums="c25e8e91de3a222ff1e562a73783d600d3ce3e4517826df532e7a2328332b8b4 lua-zlib-0.4.1.tar.gz"
+sha512sums="44b88d3be6c184bf6c25e13ea26036aa5739ac6d10b19fe60475f04fbb40f7d7a266a8d22334a7fb696f9224f03c8e85ce9966c437dd91a23fa7b0c92edc102c lua-zlib-0.4.1.tar.gz"