diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-10-15 08:32:04 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-10-15 11:42:48 +0000 |
commit | 618d015435c6b4ebb1ab0ea0cb5b57983bf39962 (patch) | |
tree | a523c2784ae04645657e0d729a638a0a4e0d870a /main/lua-lzlib/APKBUILD | |
parent | ccd8138fcd073bf329d5d20f3f76199557266dee (diff) | |
download | aports-618d015435c6b4ebb1ab0ea0cb5b57983bf39962.tar.bz2 aports-618d015435c6b4ebb1ab0ea0cb5b57983bf39962.tar.xz |
main/lua-zlib: rename to lua-lzlib
this is to avoid name conflict with lua-zlib
https://github.com/brimworks/lua-zlib
ref #1853
Diffstat (limited to 'main/lua-lzlib/APKBUILD')
-rw-r--r-- | main/lua-lzlib/APKBUILD | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/main/lua-lzlib/APKBUILD b/main/lua-lzlib/APKBUILD new file mode 100644 index 0000000000..846af4c083 --- /dev/null +++ b/main/lua-lzlib/APKBUILD @@ -0,0 +1,66 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> + +_luaversions="5.1 5.2" + +pkgname=lua-lzlib +_name=lzlib +pkgver=0.4.1 +pkgrel=0 +pkgdesc="Lua bindings to the ZLib compression library" +url="https://github.com/LuaDist/lzlib" +arch="all" +license="MIT" +depends="" +makedepends="zlib-dev" +subpackages= +for _i in $_luaversions; do + depends="$depends lua$_i-lzlib" + makedepends="$makedepends lua$_i-dev" + subpackages="$subpackages lua$_i-lzlib:_zlib_${_i/./_}" +done +install= +source="$pkgname-$pkgver.tar.gz::https://github.com/LuaDist/$_name/archive/$pkgver.tar.gz" + +_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" + 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() { + mkdir -p "$pkgdir" +} + +_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-lzlib-0.4.1.tar.gz" +sha256sums="c25e8e91de3a222ff1e562a73783d600d3ce3e4517826df532e7a2328332b8b4 lua-lzlib-0.4.1.tar.gz" +sha512sums="44b88d3be6c184bf6c25e13ea26036aa5739ac6d10b19fe60475f04fbb40f7d7a266a8d22334a7fb696f9224f03c8e85ce9966c437dd91a23fa7b0c92edc102c lua-lzlib-0.4.1.tar.gz" |