aboutsummaryrefslogtreecommitdiffstats
path: root/community/lua-resty-http/APKBUILD
blob: 9763d297fdabc6c9a1b7d1da40da70ed10ff8c77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=lua-resty-http
pkgver=0.10
pkgrel=0
pkgdesc="Lua HTTP client cosocket driver for OpenResty / ngx_lua"
url="https://github.com/pintsized/lua-resty-http"
arch="noarch"
license="BSD2"
subpackages=""
source="$pkgname-$pkgver.tar.gz::https://github.com/pintsized/lua-resty-http/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"
options="!check"

_luaversions="5.1 5.2 5.3"
for _v in $_luaversions; do
	subpackages="$subpackages lua$_v-${pkgname#lua-}:_subpackage"
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"

	cd "$builddir"
	make install DESTDIR="$subpkgdir" LUA_LIB_DIR="/usr/share/lua/$lver"
}

sha512sums="5ce79bd5e58c09418470fd588670b79610085b61571861c6c9fd71e716c6b599a426e4045431c0e8ab493b5b66d2f851251fc2b0aaed338433619ff3669aab05  lua-resty-http-0.10.tar.gz"