aboutsummaryrefslogtreecommitdiffstats
path: root/main/gdnsd/APKBUILD
blob: 5652bf31d5e26cfecc679d8762d9545ec1f0f7b1 (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=gdnsd
pkgver=1.6.9
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 libtool"
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
	libtoolize --force || return 1
	aclocal -I m4 || return 1
	autoconf || return 1
	automake --add-missing || return 1
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--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
        install -Dm755 "$srcdir"/gdnsd.initd \
		"$pkgdir"/etc/init.d/gdnsd || return 1
}

md5sums="c8ea1da00fabc52e3d685528444f1279  gdnsd-1.6.9.tar.xz
02eb668b6cad54552568a35985f44a09  geoip-autodc.patch
7fb697653b8295322e53492f9051e831  geoip-speedup.patch
00f2838e0908effaaa2f6e6a1699f25b  gdnsd.initd
4c8ff14e377fb8f1854b68b7bf9be282  0001-preliminary-djbdns-support.patch"