aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-05-29 21:12:27 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-05-29 21:12:59 +0200
commitfbbfdb0c140e8f4f830014f373943d9c98147f80 (patch)
treeabc0499130bc1848bd94497516ce759b33346943
parent09f4347f39f648b3530c64331fb429d30d14d489 (diff)
downloadaports-fbbfdb0c140e8f4f830014f373943d9c98147f80.tar.bz2
aports-fbbfdb0c140e8f4f830014f373943d9c98147f80.tar.xz
testing/lua-glob-pattern: new aport
https://github.com/davidm/lua-glob-pattern Converts file glob string to Lua pattern string
-rw-r--r--testing/lua-glob-pattern/APKBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/testing/lua-glob-pattern/APKBUILD b/testing/lua-glob-pattern/APKBUILD
new file mode 100644
index 0000000000..a5aac944c0
--- /dev/null
+++ b/testing/lua-glob-pattern/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=lua-glob-pattern
+pkgver=0.2.1.20120406
+_gitrev=fc48cf953cfef57e7f2363f02e7b191819b477f6
+pkgrel=0
+pkgdesc="Converts file glob string to Lua pattern string"
+url="https://github.com/davidm/lua-glob-pattern"
+arch="noarch"
+license="MIT"
+checkdepends=""
+subpackages=""
+source="$pkgname-$pkgver.tar.gz::https://github.com/davidm/$pkgname/archive/$_gitrev.tar.gz"
+builddir="$srcdir/$pkgname-$_gitrev"
+
+# 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 test.lua
+ 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 -m 644 -D lua/globtopattern.lua \
+ "$subpkgdir"/usr/share/lua/$lver/globtopattern.lua
+}
+
+sha512sums="8e1b31538d8c035558721d7793b15ea34f8e745bf25e6599fe514dce3f8b16decd13f80f67b9d782e53675a98791792ad0f16c180f6d9fc2686a4f4cc53e633e lua-glob-pattern-0.2.1.20120406.tar.gz"