# Maintainer: Kevin Daudt pkgname="geodns" pkgver="3.0.1" pkgrel=1 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 " builddir="$srcdir/src/github.com/abh/geodns" prepare() { mkdir -p ${builddir%/*} ln -sfT "$srcdir"/$pkgname-$pkgver "$builddir" default_prepare } build() { export GOPATH="$srcdir" 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="a8ed916f6203e31cd44f55ab5f150dbee5518f6cf0dc335687b11f7dd2012d33edb71aa7cf84113cbd440ba9246224e36430bb1b5381f21e5265e02cc56345f2 geodns-3.0.1.tar.gz dc315782eb77627e2cd23a78ebef2f85a0a37a9129f6e16c817d7b9540c8b02987d35fc46882d7752c09caca825c5a77d2d3a27ae19ccccf2bba2e04bc74940c geodns.initd ce2c7f51151313fa35f132f05cb59458eabb0a74208a79d585d579ce88d0ab168eab389fd59e931b4b19da7fcbca202bf495af345156e47dccb187b746b3ee15 geodns.confd"