blob: 6e5e92ef334333ce0dba7547c8b7284f44c2d126 (
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=knot-resolver
pkgver=1.2.4
pkgrel=1
pkgdesc="Minimalistic caching DNS resolver implementation"
url="https://www.knot-resolver.cz/"
# luajit is not available for disabled arches
arch="all !s390x"
license="GPL-3.0"
depends="lua5.1-sec lua5.1-socket"
depends_dev="knot-dev libuv-dev luajit-dev"
makedepends="$depends_dev"
install="$pkgname.pre-install"
pkgusers="kresd"
pkggroups="kresd"
subpackages="$pkgname-mod-http:http:noarch $pkgname-dev $pkgname-doc"
source="https://secure.nic.cz/files/$pkgname/$pkgname-$pkgver.tar.xz
$pkgname.initd
$pkgname.confd
$pkgname.logrotate
config
root.keys"
builddir="$srcdir/$pkgname-$pkgver"
_flags="PREFIX=/usr
ETCDIR=/etc/$pkgname"
build() {
cd "$builddir"
make $_flags
}
package() {
make -C "$builddir" $_flags DESTDIR="$pkgdir" install || return 1
cd "$pkgdir"
# Move sample configs to -doc.
mkdir -p ./usr/share/doc/$pkgname
mv ./etc/$pkgname/* ./usr/share/doc/$pkgname/ || return 1
chmod 644 ./usr/share/doc/$pkgname/* || return 1
install -m 640 -o root -g kresd "$srcdir"/config \
./etc/$pkgname/config || return 1
install -m 755 -o kresd -g kresd -d ./var/lib/$pkgname || return 1
install -m 644 -o kresd -D "$srcdir"/root.keys \
./var/lib/$pkgname/root.keys || return 1
install -m 755 -D "$srcdir"/$pkgname.initd ./etc/init.d/$pkgname || return 1
install -m 644 -D "$srcdir"/$pkgname.confd ./etc/conf.d/$pkgname || return 1
install -m 644 -D "$srcdir"/$pkgname.logrotate ./etc/logrotate.d/$pkgname
}
# TODO: depends on https://github.com/daurnimator/lua-http!
http() {
pkgdesc="Knot DNS resolver - HTTP/2 services"
depends="$pkgname"
local moddir="usr/lib/kdns_modules"
mkdir -p "$subpkgdir"/$moddir
mv "$pkgdir"/$moddir/http* "$subpkgdir"/$moddir/
}
sha512sums="1afd363c64d4adf167544f1a94d1dcc509bd922d24ef99fac7d4222783492d507da0c65657d59aada961f7edb6d6b3986a2cfc876f548c6900092eebd49e56e0 knot-resolver-1.2.4.tar.xz
0e9b947ed0fe39a600ba8fe3cdeacf07521cdd6c371007dd15524f67c75ea024994a8c11820d70c57ef180c90f492eae69ef167152ad84c24a47c885710a7974 knot-resolver.initd
9d0d629405df243dc0f782abd6fcaaaf13fbce78d881f7ce213cfd2a55cfbfd87af2ba976061bf7b5d3d055edec98b42632395390f2a469648c27f96124997a6 knot-resolver.confd
688aeacb0c1f21c7e532533b402e67068897217713fb668636df7533000b493981ddfa0497f8dba7da7c804ee4ab8d587a4f52155b4e2bf1f4025d2588d314bb knot-resolver.logrotate
913a557dde84e9dac7c7300ab093285865fa57f3875fc357e680f04a0e85af6610a0e33da6262431cbb06a2c5a115952e742e48c8568d4eb82182906170b4a73 config
d8b7bab857937372fc66853387eb8783eba3783513ac545016acafb7e8659d0412d883d6a217d80512860c5b265b8b5cc981cbe7bbe59eefc2bf18fb17ef4f83 root.keys"
|