blob: b2802c7243f7507d99a8cf4302090f5b2a55c345 (
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
35
36
37
38
39
40
41
42
43
44
45
46
|
# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
_luaversions="5.1"
pkgname=lua-resty-dns
pkgver=0.18
pkgrel=2
pkgdesc="DNS resolver for the nginx lua module"
url="https://github.com/openresty/lua-resty-dns"
# ppc64le, riscv64 blocked by nginx-mod-http-lua
arch="noarch !ppc64le !riscv64"
license="BSD-2-Clause"
depends="nginx-mod-http-lua"
source="lua-resty-dns-$pkgver.tar.gz::https://github.com/openresty/lua-resty-dns/archive/v$pkgver.tar.gz
add-naptr.patch"
for _v in $_luaversions; do
subpackages="$subpackages lua$_v-resty-dns:split_${_v/./_}"
done
package() {
local _i
for _i in $_luaversions; do
mkdir -p "$pkgdir"/usr/share/lua/$_i
make DESTDIR="$pkgdir" LUA_LIB_DIR="/usr/share/lua/$_i" install
done
}
_split() {
local d= _ver=$1
pkgdesc="$pkgdesc for Lua $_ver"
install_if="lua$_ver $pkgname=$pkgver-r$pkgrel"
depends=
for d in usr/lib/lua usr/share/lua; do
if [ -d "$pkgdir"/$d/$_ver ]; then
mkdir -p "$subpkgdir"/$d
mv "$pkgdir"/$d/$_ver "$subpkgdir"/$d/
fi
done
}
for _v in $_luaversions; do
eval "split_${_v/./_}() { _split $_v; }"
done
sha512sums="c825b34428aa50d1640b76bac4c39e4f39de042b3f7beef3eb764a01f09e173e439e5e0560bc49daa01891ea0f2c44ef993fe9839939bc0d06025a8aa1b0c005 lua-resty-dns-0.18.tar.gz
9f245faff407938965cd0b719ca0952678468cb9f34c1cbb6809b9ed8806c0f6441c1dee0950fd5e21b5f65666c0f651e84a01f9f69f05a4df3e65757a744669 add-naptr.patch"
|