diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-11-10 22:06:33 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-11-10 22:06:54 +0100 |
commit | 17081bec8c7cfc0b319b4e8fad87c07504d60a74 (patch) | |
tree | c7d6552d85b23d5b75b02ed2f9eb971d0c088e95 /community/lua-http | |
parent | 6b79652132810dc73631c8224871b89fd43c24c3 (diff) | |
download | aports-17081bec8c7cfc0b319b4e8fad87c07504d60a74.tar.bz2 aports-17081bec8c7cfc0b319b4e8fad87c07504d60a74.tar.xz |
community/lua-http: move from testing
Diffstat (limited to 'community/lua-http')
-rw-r--r-- | community/lua-http/APKBUILD | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/community/lua-http/APKBUILD b/community/lua-http/APKBUILD new file mode 100644 index 0000000000..28dd53ca15 --- /dev/null +++ b/community/lua-http/APKBUILD @@ -0,0 +1,66 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=lua-http +pkgver=0.2 +pkgrel=0 +pkgdesc="HTTP Library for Lua that supports HTTP(S) 1.0, 1.1 and 2.0" +url="https://github.com/daurnimator/lua-http" +arch="noarch" +license="MIT" +depends="lua-cqueues lua-basexx lua-fifo lua-lpeg lua-lpeg_patterns lua-ossl" +checkdepends="lua-busted lua-compat53 lua5.1-bit32" +makedepends="" +subpackages="" +source="$pkgname-$pkgver.tar.gz::https://github.com/daurnimator/$pkgname/archive/v$pkgver.tar.gz" +builddir="$srcdir/$pkgname-$pkgver" + +case "$CARCH" in + # luajit is not available for s390x + s390x) _luajit="";; + # XXX: Some tests fail with "Address not available". + aarch64 | armhf) options="!check";; + *) 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" + local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$pkgname/$pkgver-1" + + if [ "$lver" != "5.3" ]; then + depends="$depends lua$lver-compat5.3" + fi + if [ "$lver" = "5.1" ]; then + depends="$depends lua5.1-bit32" + fi + + mkdir -p "$lmod_dir" + cp -r "$builddir"/http "$lmod_dir"/ + + mkdir -p "$rockdir" + echo 'rock_manifest = {}' > "$rockdir"/rock_manifest +} + +sha512sums="ed71ac09277e8602e3d4954541f06c09ef444db20e5b4e39a17b9ed4893046b1442969902c0ba84fc4c3c922a6d1c8ebf853fceda261b12bf10ea9aa24389587 lua-http-0.2.tar.gz" |