diff options
-rw-r--r-- | community/lua-copas/APKBUILD | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/community/lua-copas/APKBUILD b/community/lua-copas/APKBUILD index 18106c31cf..c3a760a093 100644 --- a/community/lua-copas/APKBUILD +++ b/community/lua-copas/APKBUILD @@ -9,17 +9,33 @@ pkgdesc="Coroutine Oriented Portable Asynchronous Services for Lua" url="http://keplerproject.github.io/copas/" arch="noarch" license="MIT" -makedepends="" +depends="lua-socket" +checkdepends="lua5.1-coxpcall lua-sec" subpackages="" source="$pkgname-$pkgver.tar.gz::https://github.com/keplerproject/$_pkgname/archive/v$_pkgver.tar.gz" builddir="$srcdir/$_pkgname-$_pkgver" +# luajit is not available on s390x +case "$CARCH" in + s390x) _luajit="";; + *) checkdepends="$checkdepends luajit" _luajit="jit";; +esac + _luaversions="5.1 5.2 5.3" for _v in $_luaversions; do - makedepends="$makedepends lua$_v-dev" subpackages="$subpackages lua$_v-$_pkgname:_subpackage" + checkdepends="$checkdepends lua$_v" done +check() { + cd "$builddir" + + local lver; for lver in $_luaversions $_luajit; do + msg "Testing on lua$lver" + make test LUA=lua$lver + done +} + package() { mkdir -p "$pkgdir" } @@ -27,7 +43,7 @@ package() { _subpackage() { local lver="${subpkgname:3:3}" pkgdesc="$pkgdesc $lver" - depends="lua$lver lua$lver-socket" + depends="lua$lver ${depends//lua-/lua$lver-}" [ "$lver" = 5.1 ] && depends="$depends lua5.1-coxpcall" install_if="lua$lver $pkgname=$pkgver-r$pkgrel" |