blob: 404a7449168a3dbf72ce165bb367460e34782eb6 (
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
73
74
75
76
77
78
79
80
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=knot-resolver
pkgver=2.2.0
pkgrel=0
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 libedit-dev libuv-dev luajit-dev"
makedepends="$depends_dev bash vim"
checkdepends="cmocka-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
}
check() {
cd "$builddir"
make $_flags -j1 check
}
package() {
cd "$builddir"
make $_flags DESTDIR="$pkgdir" install
cd "$pkgdir"
# Move sample configs to -doc.
mkdir -p ./usr/share/doc/$pkgname
mv ./etc/$pkgname/* ./usr/share/doc/$pkgname/
chmod 644 ./usr/share/doc/$pkgname/*
install -m 640 -o root -g kresd "$srcdir"/config \
./etc/$pkgname/config
install -m 755 -o kresd -g kresd -d ./var/lib/$pkgname
install -m 644 -o kresd -D "$srcdir"/root.keys \
./var/lib/$pkgname/root.keys
install -m 755 -D "$srcdir"/$pkgname.initd ./etc/init.d/$pkgname
install -m 644 -D "$srcdir"/$pkgname.confd ./etc/conf.d/$pkgname
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/
}
sha256sums="7bb7f0cd8bbb1d99706d56ed119bdffce094628479438896f3740644efe614fa knot-resolver-2.2.0.tar.xz"
sha512sums="397ae54cb5d1a838866175725b155862e54d5ff1191caab59641bcfd16cf4c965ea1b4f7f001d181c052941ff8df0d231be793a05383aa0abbd4a4130447e532 knot-resolver-2.2.0.tar.xz
0e9b947ed0fe39a600ba8fe3cdeacf07521cdd6c371007dd15524f67c75ea024994a8c11820d70c57ef180c90f492eae69ef167152ad84c24a47c885710a7974 knot-resolver.initd
9d0d629405df243dc0f782abd6fcaaaf13fbce78d881f7ce213cfd2a55cfbfd87af2ba976061bf7b5d3d055edec98b42632395390f2a469648c27f96124997a6 knot-resolver.confd
688aeacb0c1f21c7e532533b402e67068897217713fb668636df7533000b493981ddfa0497f8dba7da7c804ee4ab8d587a4f52155b4e2bf1f4025d2588d314bb knot-resolver.logrotate
913a557dde84e9dac7c7300ab093285865fa57f3875fc357e680f04a0e85af6610a0e33da6262431cbb06a2c5a115952e742e48c8568d4eb82182906170b4a73 config
d8b7bab857937372fc66853387eb8783eba3783513ac545016acafb7e8659d0412d883d6a217d80512860c5b265b8b5cc981cbe7bbe59eefc2bf18fb17ef4f83 root.keys"
|