blob: 3c8b2cb0d2ef0f3f87fb8ce9c9fd9e676474cb36 (
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
81
82
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=knot-resolver
pkgver=2.3.0
pkgrel=2
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"
pkgusers="kresd"
pkggroups="kresd"
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"
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"
# secfixes:
# 2.3.0-r0:
# - CVE-2018-1110
_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/
}
sha512sums="030594d6b096092962ce5f5c09a4d3a429433837f26b8bbdbaeba3ae201dd12ab8511e8314bd0f1d6f1b6f08d1d57e978425798fe31da4451f798e08610cff36 knot-resolver-2.3.0.tar.xz
0e9b947ed0fe39a600ba8fe3cdeacf07521cdd6c371007dd15524f67c75ea024994a8c11820d70c57ef180c90f492eae69ef167152ad84c24a47c885710a7974 knot-resolver.initd
9d0d629405df243dc0f782abd6fcaaaf13fbce78d881f7ce213cfd2a55cfbfd87af2ba976061bf7b5d3d055edec98b42632395390f2a469648c27f96124997a6 knot-resolver.confd
688aeacb0c1f21c7e532533b402e67068897217713fb668636df7533000b493981ddfa0497f8dba7da7c804ee4ab8d587a4f52155b4e2bf1f4025d2588d314bb knot-resolver.logrotate
913a557dde84e9dac7c7300ab093285865fa57f3875fc357e680f04a0e85af6610a0e33da6262431cbb06a2c5a115952e742e48c8568d4eb82182906170b4a73 config
d8b7bab857937372fc66853387eb8783eba3783513ac545016acafb7e8659d0412d883d6a217d80512860c5b265b8b5cc981cbe7bbe59eefc2bf18fb17ef4f83 root.keys"
|