aboutsummaryrefslogtreecommitdiffstats
path: root/community/lua-basexx
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-07-21 15:45:55 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-07-21 15:45:55 +0200
commitda31d76c19084dd733dbf58544ac4c7dac84b95a (patch)
treefdd5f4a1bb276b19da5fd21f41a23179f4414ffa /community/lua-basexx
parent63e95f2b70a14bd747f4853341a1fa78130e2b42 (diff)
downloadaports-da31d76c19084dd733dbf58544ac4c7dac84b95a.tar.bz2
aports-da31d76c19084dd733dbf58544ac4c7dac84b95a.tar.xz
community/lua-basexx: move from testing
Diffstat (limited to 'community/lua-basexx')
-rw-r--r--community/lua-basexx/APKBUILD53
1 files changed, 53 insertions, 0 deletions
diff --git a/community/lua-basexx/APKBUILD b/community/lua-basexx/APKBUILD
new file mode 100644
index 0000000000..f5e54dd194
--- /dev/null
+++ b/community/lua-basexx/APKBUILD
@@ -0,0 +1,53 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=lua-basexx
+_pkgname=basexx
+pkgver=0.4.0
+pkgrel=0
+pkgdesc="A Lua library for base2, base16, base32, base64, base85 decoding and encoding of data strings"
+url="https://github.com/aiq/basexx/"
+arch="noarch"
+license="MIT"
+checkdepends="lua-busted"
+subpackages=""
+source="$pkgname-$pkgver.tar.gz::https://github.com/aiq/$_pkgname/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+# luajit is not available for selected arches
+case "$CARCH" in
+ s390x) _luajit="";;
+ *) checkdepends="$checkdepends luajit" _luajit="jit";;
+esac
+
+_luaversions="5.1 5.2 5.3"
+for _v in $_luaversions; do
+ subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
+ checkdepends="$checkdepends lua$_v"
+done
+
+check() {
+ cd "$builddir"
+
+ local lver; for lver in $_luaversions $_luajit; do
+ msg "Testing on lua$lver"
+ lua$lver /usr/bin/busted
+ 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"
+ local lmod_dir="$subpkgdir/usr/share/lua/$lver"
+
+ cd "$builddir"
+ mkdir -p "$lmod_dir"
+ cp -r lib/* "$lmod_dir"/
+}
+
+sha512sums="96f8e5417357cc11019ae32895f685e74182d8ea64923fb124122257eda0ad64eb6da17f0f40448f688bfa3f36ebcad70a5ae159f088ac91785ec17cb1a674bd lua-basexx-0.4.0.tar.gz"