aboutsummaryrefslogtreecommitdiffstats
path: root/community/lua-cliargs
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-03-12 22:11:01 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-03-12 22:11:34 +0100
commit980a484c36abf2345cd67f9036a9bbdbaf9a49b2 (patch)
tree54c2af5fe9fda05eb5777d9359dc3e8a5e9ed26e /community/lua-cliargs
parent047a398a26fe9cd772e494fe8b7c6da47be01c18 (diff)
downloadaports-980a484c36abf2345cd67f9036a9bbdbaf9a49b2.tar.bz2
aports-980a484c36abf2345cd67f9036a9bbdbaf9a49b2.tar.xz
community/lua-cliargs: move from testing
Diffstat (limited to 'community/lua-cliargs')
-rw-r--r--community/lua-cliargs/APKBUILD45
1 files changed, 45 insertions, 0 deletions
diff --git a/community/lua-cliargs/APKBUILD b/community/lua-cliargs/APKBUILD
new file mode 100644
index 0000000000..00f43ff066
--- /dev/null
+++ b/community/lua-cliargs/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=lua-cliargs
+_pkgname=lua_cliargs
+pkgver=3.0.1
+_pkgver=${pkgver%.*}-${pkgver##*.}
+pkgrel=0
+pkgdesc="A command-line argument parsing module for Lua"
+url="https://github.com/amireh/lua_cliargs"
+arch="noarch"
+license="MIT"
+makedepends=""
+subpackages=""
+source="$pkgname-$pkgver.tar.gz::https://github.com/amireh/$_pkgname/archive/v$_pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$_pkgver"
+
+_luaversions="5.1 5.2 5.3"
+for _v in $_luaversions; do
+ makedepends="$makedepends luarocks$_v"
+ subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
+done
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_subpackage() {
+ local lver="${subpkgname:3:3}"
+ pkgdesc="$pkgdesc $lver"
+ depends="lua$lver"
+ install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
+
+ cd "$builddir"
+
+ luarocks-$lver install \
+ --deps-mode=none \
+ --tree="$subpkgdir/usr" \
+ $_pkgname-$_pkgver.rockspec || return 1
+
+ # Remove LuaRock manifests.
+ rm -Rf "$subpkgdir"/usr/lib/luarocks
+ rmdir "$subpkgdir"/usr/lib
+}
+
+sha512sums="2bdcd3c790a82351df598cb3d289de980fe771222ebd9715036678eecdbe51b7563d24629afa4d286b900d722bf844004d12f2330744a1e644d9286ac44b4dbe lua-cliargs-3.0.1.tar.gz"