aboutsummaryrefslogtreecommitdiffstats
path: root/testing/pdns/APKBUILD
diff options
context:
space:
mode:
authorMatt Smith <mcs@darkregion.net>2011-04-05 07:03:25 -0500
committerMatt Smith <mcs@darkregion.net>2011-04-05 07:06:35 -0500
commit2bf9528b2e0f8350fbd20976efdce0bafb3e4b33 (patch)
treebb4e916718d167a53465c0d7d2ab1d6b23ab644a /testing/pdns/APKBUILD
parentdcd1f5b67f797d77535a5c9ab53bad11819da64a (diff)
downloadaports-2bf9528b2e0f8350fbd20976efdce0bafb3e4b33.tar.bz2
aports-2bf9528b2e0f8350fbd20976efdce0bafb3e4b33.tar.xz
testing/pdns: new aport
PowerDNS Authoritative Server http://www.powerdns.com/
Diffstat (limited to 'testing/pdns/APKBUILD')
-rw-r--r--testing/pdns/APKBUILD113
1 files changed, 113 insertions, 0 deletions
diff --git a/testing/pdns/APKBUILD b/testing/pdns/APKBUILD
new file mode 100644
index 0000000000..de457143fe
--- /dev/null
+++ b/testing/pdns/APKBUILD
@@ -0,0 +1,113 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=pdns
+pkgver=3.0
+_extver=rc1
+_realver=$pkgver-$_extver
+pkgrel=0
+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 mysql-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://powerdnssec.org/downloads/$pkgname-$_realver.tar.gz
+ 0010-disable-execinfo.patch
+ pdns.initd
+ pdns.conf
+ "
+
+_builddir="$srcdir/$pkgname-$_realver"
+
+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 -m644 -D "$srcdir"/$pkgname.conf \
+ "$pkgdir"/etc/$pkgname.conf || return 1
+ chown pdns:pdns "$pkgdir"/etc/$pkgname.conf || return 1
+ chmod 600 "$pkgdir"/etc/$pkgname.conf || return 1
+}
+
+doc() {
+ mkdir -p "$subpkgdir"/usr || return 1
+ mv "$pkgdir"/usr/share "$subpkgdir"/usr/ || return 1
+
+ _docs="AUTHORS COPYING ChangeLog HACKING INSTALL NEWS README TODO"
+ mkdir -p "$subpkgdir"/usr/share/doc/$pkgname || return 1
+ for _doc in $_docs; do
+ cp "$_builddir"/$_doc \
+ "$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
+ done
+}
+
+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 || return 1
+ mv "$pkgdir"/usr/lib/pdns/lib${backend}backend.so \
+ "$subpkgdir"/usr/lib/pdns/ || return 1
+ mv "$pkgdir"/usr/lib/pdns/lib${backend}backend.la \
+ "$subpkgdir"/usr/lib/pdns/ || return 1
+}
+
+md5sums="99a457688dcc246faa43dfb64c65c424 pdns-3.0-rc1.tar.gz
+fd4d14c30bae793072ba7f3fa6cca80e 0010-disable-execinfo.patch
+3c4789e9a7330579d1882344bc10b27c pdns.initd
+351bac7f784a1a40e768466d9e6f1a79 pdns.conf"