blob: 6f66f4613964afba8e478de6dfb31a7ada576faa (
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
|
# Contributor: Mark Pashmfouroush <mark@markpash.me>
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Mark Pashmfouroush <mark@markpash.me>
pkgname=coredns
pkgver=1.11.1
pkgrel=5
pkgdesc="fast and flexible DNS server"
url="https://github.com/coredns/coredns"
license="Apache-2.0"
arch="all"
makedepends="go unbound-dev"
install="$pkgname.pre-install"
subpackages="$pkgname-openrc"
source="https://github.com/coredns/coredns/archive/v$pkgver/coredns-$pkgver.tar.gz
coredns.confd
coredns.initd
coredns.logrotated
ensure-cgo.patch
plugin.cfg.enabled
"
options="net" # for downloading Go modules
# secfixes:
# 1.9.3-r0:
# - CVE-2022-27191
# - CVE-2022-28948
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
prepare() {
default_prepare
cp "$srcdir"/plugin.cfg.enabled "$builddir"/plugin.cfg
}
build() {
CGO_ENABLED=1 make
}
check() {
cd "$builddir"/request; go test ./...
cd "$builddir"/core; go test ./...
cd "$builddir"/coremain; go test ./...
cd "$builddir"/plugin; go test ./...
}
package() {
install -Dm755 coredns "$pkgdir"/usr/bin/coredns
install -Dm755 "$srcdir"/coredns.initd "$pkgdir"/etc/init.d/coredns
install -Dm644 "$srcdir"/coredns.confd "$pkgdir"/etc/conf.d/coredns
install -Dm 644 "$srcdir"/coredns.logrotated "$pkgdir"/etc/logrotate.d/coredns
install -d "$pkgdir"/etc/coredns
install -d "$pkgdir"/var/log/coredns
}
sha512sums="
f8752811e9e7913311f47ae13f35c755ac86ea240572be1c1dabc1712b6c42380c60ac385fa9573c77d6fcf4c144df2bc00574f18e8d7b70da21ed8ae4fb87cd coredns-1.11.1.tar.gz
90300a3035b00b58f362b2c12dfaeee21b889e10e90600523b5785c907dfbd7e515c3269dd29a9d4c758990e78ede8343edfac0bc022bd3a23652543ba2d42d3 coredns.confd
802ac66ea27ac71001706b0994a579e0ab3f608a89d0a03f92490f4b73c4bd202745fd13b34d957122c8f1439be2709604c7931ff2a7be003c573e746c9d98b9 coredns.initd
c697c08c3b1153ae224a1eeb3521f9ee594de4852bc6ef78d94dc7f6f680517659a653ab5c13ea03918deb79e6654ef11512ba4c90fe06ea4591fefbab876ece coredns.logrotated
9f2c08750b42f0901bc190a4c829a5a003e4c3aa9bd55e9a2f37f68f446cdd15b60227b7d2381d85b49674580f7c0206af76345d6dd5160401772c3efbf50ab6 ensure-cgo.patch
4c2ea139af034f1868a929e501a51ab7b8650426c250ee2e01fc1f8835b7f461a9999287aae83a43f13d6c2f7c4619979747e24a94bc47921e299e912aac43cc plugin.cfg.enabled
"
|