aboutsummaryrefslogtreecommitdiffstats
path: root/testing/pdns/APKBUILD
blob: acedeb31cdb6fcde0bc0d2c6f5106d2175245263 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer:  Matt Smith <mcs@darkregion.net>
pkgname=pdns
pkgver=3.4.3
pkgrel=1
pkgdesc="PowerDNS Authoritative Server"
url="http://www.powerdns.com/"
arch="all"
license="GPL"
depends=""
depends_dev=""
makedepends="$depends_dev boost-dev lua-dev openldap-dev mariadb-dev
	postgresql-dev sqlite-dev"
install="$pkgname.pre-install $pkgname.post-deinstall"
subpackages="$pkgname-doc
	$pkgname-backend-geo:backend_geo
	$pkgname-backend-ldap:backend_ldap
	$pkgname-backend-mysql:backend_mysql
	$pkgname-backend-pgsql:backend_pgsql
	$pkgname-backend-pipe:backend_pipe
	$pkgname-backend-sqlite3:backend_sqlite3
	"
pkgusers="pdns"
pkggroups="pdns"
source="http://downloads.powerdns.com/releases/pdns-$pkgver.tar.bz2
	0010-disable-execinfo.patch
	allocate-tcp-buffer-dynamically.patch
	pdns.initd
	pdns.conf
	"

_builddir="$srcdir/$pkgname-$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"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--libdir=/usr/lib/pdns \
		--with-modules="" \
		--with-dynmodules="geo ldap gmysql gpgsql pipe gsqlite3" \
		--disable-recursor \
		--disable-static \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1

	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname || return 1
	rm "$pkgdir"/etc/pdns.conf-dist
	install -m600 -D "$srcdir"/$pkgname.conf \
		"$pkgdir"/etc/$pkgname.conf || return 1
	chown pdns:pdns "$pkgdir"/etc/$pkgname.conf || return 1
}

backend_geo()		{ _mv_backend geo; }
backend_ldap()		{ _mv_backend ldap openldap; }
backend_mysql()		{ _mv_backend gmysql mysql; }
backend_pgsql()		{ _mv_backend gpgsql postgresql; }
backend_pipe()		{ _mv_backend pipe; }
backend_sqlite3()	{ _mv_backend gsqlite3 sqlite; }

_mv_backend() {
	local backend=$1
	pkgdesc="${backend} backend module for PowerDNS"

	# backend dependencies
	if [ -n "${2-}" ]; then
		depends="${2-}"
	fi
	depends="${depends} ${pkgname}"

	mkdir -p "$subpkgdir"/usr/lib/pdns/pdns || return 1
	mv "$pkgdir"/usr/lib/pdns/pdns/lib${backend}backend.so \
		"$subpkgdir"/usr/lib/pdns/pdns/ || return 1
}

md5sums="c570495b556eccbecb12136c72f04240  pdns-3.4.3.tar.bz2
fd4d14c30bae793072ba7f3fa6cca80e  0010-disable-execinfo.patch
ca62012b5037dd3b9f9a7127d0091a7a  allocate-tcp-buffer-dynamically.patch
db146742b8f5bd91494690ee01f29862  pdns.initd
351bac7f784a1a40e768466d9e6f1a79  pdns.conf"
sha256sums="5cd9a087757066427cd0c348f546cb84b4be4bd5e06c7ce969ec2bc21dbb8ce6  pdns-3.4.3.tar.bz2
b826f47c7693f3d90c424fffc6035c5bf253dd92e41bf2d7873bed1dee4e2d7e  0010-disable-execinfo.patch
22acf599f258a23078f81f01eac7f7f9d043ebbaf82c08504ae712abb95a0095  allocate-tcp-buffer-dynamically.patch
fbef85e8d53ea4a25e166578c0f642426d1fe3091a822a5c78837a71f563e6b4  pdns.initd
5fdf423f829dca0b50bc81bab773d7ec4ee6627e35f861124d8c2ccd79a2f50c  pdns.conf"
sha512sums="468b9d360af6730183e8b502ad9fca0965cb7f3c0927d30b88680d9b4a17dad09de791b3b343363f443a61918e973bb05ec5b43cf54f92dd12171fc7757a1278  pdns-3.4.3.tar.bz2
1a16d9695d267d14f4c08a7b932d12e5949be1e6211b413ae0fa98cea25653d7d73eaec9cddd411a89de56fc36a79371a01f57a4234af4c039d0d7994801cb05  0010-disable-execinfo.patch
e424190c03fcea66989284bde17179feeeaf42b7ef2095fa5e538cc6dd57400d193ac0195ab01f855e57c84a15da5d608905d6adf25b430253481a9c78fcbd20  allocate-tcp-buffer-dynamically.patch
589ab8d53d654dc3ae86150a80ca2853632170e21c2cf3045cb27118d6f26cb00fd3aad50a4d3de757c33bcbd249529317be099598acf2d02cff00153aba0daa  pdns.initd
9913551bb4d685aaced806134b1037d85ce759e7d9e780e256e67651d9d346aad5e608b4a45a4933f0ba879605b69d06e579c38b7f917f7a9be37c7797c5953b  pdns.conf"