aboutsummaryrefslogtreecommitdiffstats
path: root/community/lua-optparse
diff options
context:
space:
mode:
Diffstat (limited to 'community/lua-optparse')
-rw-r--r--community/lua-optparse/APKBUILD37
1 files changed, 37 insertions, 0 deletions
diff --git a/community/lua-optparse/APKBUILD b/community/lua-optparse/APKBUILD
new file mode 100644
index 0000000000..40179ee16a
--- /dev/null
+++ b/community/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.2
+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="65d5a2a0ad05b1f43fdfe28cbc84aa9eb718d0691da24ad23a92f6ca18da29b68107cbdb1c27d45d9b0aeec01f2ed8bd6755b692db40bb871865690f49a018c9 lua-optparse-1.2.tar.gz"