# Contributor: Natanael Copa # Maintainer: Timo Teräs pkgname=gdnsd pkgver=1.6.8 pkgrel=0 pkgdesc="Geographic Authoritative DNS server" url="https://github.com/blblack/gdnsd/" arch="all" license="GPL-3" depends="" depends_dev="" makedepends="libev-dev libcap-dev autoconf automake" install="$pkgname.pre-install" subpackages="$pkgname-dev $pkgname-doc" source="https://github.com/downloads/blblack/gdnsd/gdnsd-$pkgver.tar.xz geoip-autodc.patch geoip-speedup.patch 0001-preliminary-djbdns-support.patch gdnsd.initd" _builddir="$srcdir"/gdnsd-$pkgver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" autoreconf ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --enable-fast-install \ || return 1 make || return 1 install -Dm755 "$srcdir"/gdnsd.initd "$pkgdir"/etc/init.d/gdnsd \ || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 rm -f "$pkgdir"/usr/lib/*.la \ "$pkgdir"/usr/lib/gdnsd/*.la } md5sums="6271506577e6b4fd7bcd36a8bf434e6a gdnsd-1.6.8.tar.xz 7955bf52d394862512ae6c000c8b6242 geoip-autodc.patch 7fb697653b8295322e53492f9051e831 geoip-speedup.patch 4c8ff14e377fb8f1854b68b7bf9be282 0001-preliminary-djbdns-support.patch 00f2838e0908effaaa2f6e6a1699f25b gdnsd.initd"