# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=lua-resty-http pkgver=0.12 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" local rockdir="$subpkgdir/usr/lib/luarocks/rocks-$lver/$pkgname/$pkgver-1" cd "$builddir" make install DESTDIR="$subpkgdir" LUA_LIB_DIR="/usr/share/lua/$lver" mkdir -p "$rockdir" echo 'rock_manifest = {}' > "$rockdir"/rock_manifest } sha512sums="36792e6ce079d87543ae0be49cb46ad05aff0bfd954df67bb9bb4c0d1a18ecda22e24861dd5b23c587c18f0a295a61288252d88b92e2452f7b3a51aaf5bd0b80 lua-resty-http-0.12.tar.gz"