aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-07-18 15:31:32 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-07-18 15:32:13 +0200
commitcee69f37ad4aebc18b7f49c55138c1f7c815c0db (patch)
tree258250510b5b06f2afa6f8968082a9da6ce1c091 /testing
parent01beda66a7998beeca74a0caab891d8c2b8ad036 (diff)
downloadaports-cee69f37ad4aebc18b7f49c55138c1f7c815c0db.tar.bz2
aports-cee69f37ad4aebc18b7f49c55138c1f7c815c0db.tar.xz
testing/lua-brieflz: new aport
https://github.com/jirutka/brieflz.lua Lua binding for BriefLZ compression library
Diffstat (limited to 'testing')
-rw-r--r--testing/lua-brieflz/APKBUILD53
1 files changed, 53 insertions, 0 deletions
diff --git a/testing/lua-brieflz/APKBUILD b/testing/lua-brieflz/APKBUILD
new file mode 100644
index 0000000000..596f1bc33d
--- /dev/null
+++ b/testing/lua-brieflz/APKBUILD
@@ -0,0 +1,53 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=lua-brieflz
+_pkgname=brieflz.lua
+pkgver=0.1.0
+pkgrel=0
+pkgdesc="Lua binding for BriefLZ compression library"
+url="https://github.com/jirutka/brieflz.lua"
+arch="all"
+license="MIT"
+makedepends=""
+subpackages=""
+source="$pkgname-$pkgver.tar.gz::https://github.com/jirutka/$_pkgname/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+options="!check" # XXX: missing moonscript pkg
+
+_luaversions="5.1 5.2 5.3"
+for _v in $_luaversions; do
+ makedepends="$makedepends lua$_v-dev luarocks$_v"
+ subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
+done
+
+build() {
+ cd "$builddir"
+
+ local lver; for lver in $_luaversions; do
+ msg "Building for Lua $lver..."
+
+ luarocks-$lver \
+ CC="$CC" \
+ CFLAGS="$CFLAGS -fPIC" \
+ LUA_INCDIR="$(pkg-config --variable=includedir lua$lver)" \
+ LUA_LIBDIR="$(pkg-config --variable=libdir lua$lver)" \
+ make --tree=./build brieflz-dev-0.rockspec
+ done
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_subpackage() {
+ local lver="${subpkgname:3:3}"
+ pkgdesc="$pkgdesc (for Lua $lver)"
+ depends="lua$lver"
+ install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
+
+ cd "$builddir"
+ install -D -m 755 build/lib/lua/$lver/brieflz.so \
+ "$subpkgdir"/usr/lib/lua/$lver/brieflz.so
+}
+
+sha512sums="a6449f3ffb953adbc41335856a9b23e614ed5c1834a2c8f96553949efe3e5099a9fc5d3ede170e53dc36da2b2ec18ad6c6df0d8247c50791a978cd332d463442 lua-brieflz-0.1.0.tar.gz"