aboutsummaryrefslogtreecommitdiffstats
path: root/testing/coredns/APKBUILD
blob: f2722576bd7a5657cbb0e47f8908f334bccd1e13 (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
# Contributor: Mark Pashmfouroush <mark@markpash.me>
# Maintainer: Mark Pashmfouroush <mark@markpash.me>
pkgname=coredns
pkgver=1.8.3
pkgrel=1
pkgdesc="fast and flexible DNS server"
url="https://github.com/coredns/coredns"
license="Apache-2.0"
arch="all"
options="net"
makedepends="go libcap"
install="$pkgname.pre-install"
subpackages="$pkgname-openrc"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/coredns/coredns/archive/v$pkgver.tar.gz
	coredns.confd
	coredns.initd
	"

build() {
	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
	setcap cap_net_bind_service=+ep "$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 -d "$pkgdir"/etc/coredns
}

sha512sums="2cc2754e9e626d40a2101f17744e8c57bd6d469eacbb4cfee965c2bf485156ae91f4cc99f8e63b5641163e8716c9614b6f9481fb91acb96e62951044bdac1fa8  coredns-1.8.3.tar.gz
2ff396033c570f45b5880556a8724b05356276db451cf6e6cfb477f64f4b863801a891940f72c0b1c8268bae176094d02890d27146901f296e4e8d9b703934d2  coredns.confd
62b6d9c8c980990bec896b2d6e0e626b0ea4a7db80ac925772e0d6f2793a6a511165bbd76b52f38a2e8243ffc68e430b32cf33c32332b483fc528ed57e2b2927  coredns.initd"