diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-07-14 22:08:16 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-07-14 22:09:46 +0200 |
commit | ec4a015b1a6c7b1ae8de18ab073a869326c0aeb5 (patch) | |
tree | 0a833403acbb992d9508d0c63b435e3a205af785 | |
parent | 83c4c05503b5154431f0d66df194fcd65218c400 (diff) | |
download | aports-ec4a015b1a6c7b1ae8de18ab073a869326c0aeb5.tar.bz2 aports-ec4a015b1a6c7b1ae8de18ab073a869326c0aeb5.tar.xz |
testing/lua-lpeg_patterns: new aport
https://github.com/daurnimator/lpeg_patterns
A collection of LPEG patterns
-rw-r--r-- | testing/lua-lpeg_patterns/APKBUILD | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/testing/lua-lpeg_patterns/APKBUILD b/testing/lua-lpeg_patterns/APKBUILD new file mode 100644 index 0000000000..87f723f26e --- /dev/null +++ b/testing/lua-lpeg_patterns/APKBUILD @@ -0,0 +1,54 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=lua-lpeg_patterns +_pkgname=lpeg_patterns +pkgver=0.4 +pkgrel=0 +pkgdesc="A collection of LPEG patterns" +url="https://github.com/daurnimator/lpeg_patterns" +arch="noarch" +license="MIT" +depends="lua-lpeg" +checkdepends="lua-busted" +subpackages="" +source="$pkgname-$pkgver.tar.gz::https://github.com/daurnimator/$_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 ${depends//lua-/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 $_pkgname "$lmod_dir"/ +} + +sha512sums="6bb012c36b2cac5cd1c2d76400cf1bc67a6ac11253839c6df991c90e76b4e513c2ddb676cfd815a71ba24b88d7e6a11b1de2df03889440b9d1b76a077e770efb lua-lpeg_patterns-0.4.tar.gz" |