aboutsummaryrefslogtreecommitdiffstats
path: root/community/lua-resty-http
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-01-01 21:35:53 +0100
committerJakub Jirutka <jakub@jirutka.cz>2018-01-01 21:40:32 +0100
commit63a57eb260c3a763969e65faf78750b6cb00228d (patch)
tree3467b95709f9fe3ca2492ac79307de944896dcba /community/lua-resty-http
parent29c76ea6287935850536aaac0168800794059c2e (diff)
downloadaports-63a57eb260c3a763969e65faf78750b6cb00228d.tar.bz2
aports-63a57eb260c3a763969e65faf78750b6cb00228d.tar.xz
community/lua-resty-http: install into lua/common, remove subpkgs
Diffstat (limited to 'community/lua-resty-http')
-rw-r--r--community/lua-resty-http/APKBUILD31
1 files changed, 11 insertions, 20 deletions
diff --git a/community/lua-resty-http/APKBUILD b/community/lua-resty-http/APKBUILD
index fb1cd89802..cd95cb4b15 100644
--- a/community/lua-resty-http/APKBUILD
+++ b/community/lua-resty-http/APKBUILD
@@ -2,37 +2,28 @@
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-resty-http
pkgver=0.12
-pkgrel=0
+pkgrel=1
pkgdesc="Lua HTTP client cosocket driver for OpenResty / ngx_lua"
url="https://github.com/pintsized/lua-resty-http"
arch="noarch"
license="BSD-2-Clause"
-subpackages=""
-source="$pkgname-$pkgver.tar.gz::https://github.com/pintsized/lua-resty-http/archive/v$pkgver.tar.gz"
+depends="lua"
+provides=""
+source="$pkgname-$pkgver.tar.gz::https://github.com/pintsized/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"
-options="!check"
+options="!check" # FIXME: tests require OpenResty and additional dependencies
-_luaversions="5.1 5.2 5.3"
-for _v in $_luaversions; do
- subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
+for _v in 5.1 5.2 5.3; do
+ provides="$provides lua$_v-${pkgname#lua-}=$pkgver-r$pkgrel" # for backward compatibility
done
package() {
- mkdir -p "$pkgdir"
-}
-
-_subpackage() {
- local lver="${subpkgname:3:3}"
- pkgdesc="$pkgdesc (Lua $lver)"
- depends="lua$lver"
- install_if="$pkgname=$pkgver-r$pkgrel lua$lver"
- local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$pkgname/$pkgver-1"
-
cd "$builddir"
- make install DESTDIR="$subpkgdir" LUA_LIB_DIR="/usr/share/lua/$lver"
+ make install DESTDIR="$pkgdir" LUA_LIB_DIR="/usr/share/lua/common"
- mkdir -p "$rockdir"
- echo 'rock_manifest = {}' > "$rockdir"/rock_manifest
+ echo 'rock_manifest = {}' > rock_manifest
+ install -D -m 644 rock_manifest \
+ "$pkgdir"/usr/lib/luarocks/rocks-common/$pkgname/$pkgver-1
}
sha512sums="36792e6ce079d87543ae0be49cb46ad05aff0bfd954df67bb9bb4c0d1a18ecda22e24861dd5b23c587c18f0a295a61288252d88b92e2452f7b3a51aaf5bd0b80 lua-resty-http-0.12.tar.gz"