summaryrefslogtreecommitdiff
path: root/testing/geodns/APKBUILD
blob: 3d5b5117833ebb40dbbcc31e34d1b999543b04c1 (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
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=geodns
pkgver=3.2.0
pkgrel=7
pkgdesc="DNS server with per-client targeted responses"
url="https://github.com/abh/geodns"
arch="all"
license="Apache-2.0"
makedepends="go"
subpackages="$pkgname-openrc $pkgname-logs"
source="$pkgname-$pkgver.tar.gz::https://github.com/abh/geodns/archive/v$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd
	"

export GOFLAGS="$GOFLAGS -modcacherw"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v

	cd geodns-logs
	go build -v
}

check() {
	go test
}

package() {
	install -Dm0755 "$builddir"/geodns "$pkgdir/usr/bin/geodns"

	install -Dm0644 "$builddir"/dns/geodns.conf.sample "$pkgdir"/etc/geodns/geodns.conf

	install -Dm0644 "$srcdir/$pkgname.confd" "$pkgdir/etc/conf.d/$pkgname"
	install -Dm0755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
}

logs() {
	install -Dm0755 "$builddir"/geodns-logs/geodns-logs "$subpkgdir"/usr/bin/geodns-logs
}

sha512sums="
b04ea8f80494fc7def5cc203341d9e3666530145b5a83a8a89d3ef0c3cdcd96fe1d67cdb5a8885d51e52d4f0a96b93c185cd13a95789d1d40171f0adc22a525a  geodns-3.2.0.tar.gz
dc315782eb77627e2cd23a78ebef2f85a0a37a9129f6e16c817d7b9540c8b02987d35fc46882d7752c09caca825c5a77d2d3a27ae19ccccf2bba2e04bc74940c  geodns.initd
ce2c7f51151313fa35f132f05cb59458eabb0a74208a79d585d579ce88d0ab168eab389fd59e931b4b19da7fcbca202bf495af345156e47dccb187b746b3ee15  geodns.confd
"