aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-05-29 21:10:25 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-05-29 21:12:59 +0200
commit09f4347f39f648b3530c64331fb429d30d14d489 (patch)
tree75d5fc13d01f6361ba3bd37baed8d84d1df3b07e /testing
parent0f6247ef8c25643dd183e38138b17182ccf63d90 (diff)
downloadaports-09f4347f39f648b3530c64331fb429d30d14d489.tar.bz2
aports-09f4347f39f648b3530c64331fb429d30d14d489.tar.xz
testing/lua-optparse: new aport
https://github.com/gvvaughan/optparse Parse and process command-line options
Diffstat (limited to 'testing')
-rw-r--r--testing/lua-optparse/APKBUILD37
1 files changed, 37 insertions, 0 deletions
diff --git a/testing/lua-optparse/APKBUILD b/testing/lua-optparse/APKBUILD
new file mode 100644
index 0000000000..7a8e734507
--- /dev/null
+++ b/testing/lua-optparse/APKBUILD
@@ -0,0 +1,37 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=lua-optparse
+_pkgname=optparse
+pkgver=1.1.1
+pkgrel=0
+pkgdesc="Parse and process command-line options"
+url="https://github.com/gvvaughan/optparse"
+arch="noarch"
+license="MIT"
+subpackages=""
+source="$pkgname-$pkgver.tar.gz::https://github.com/gvvaughan/$_pkgname/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+options="!check" # tests requires additional dependencies
+
+_luaversions="5.1 5.2 5.3"
+for _v in $_luaversions; do
+ subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
+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 "$builddir"/lib/* "$lmod_dir"/
+}
+
+sha512sums="7044f54a9e207287e7e6645021965a21a39170c4ba14beb5c3dcf6c6b8d83424b406399501abeba78fea704522670b310f1cf3291e6e7e675db17c1e790e43a2 lua-optparse-1.1.1.tar.gz"