diff options
Diffstat (limited to 'community/pdns/APKBUILD')
-rw-r--r-- | community/pdns/APKBUILD | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/community/pdns/APKBUILD b/community/pdns/APKBUILD new file mode 100644 index 0000000000..5d6fd9986e --- /dev/null +++ b/community/pdns/APKBUILD @@ -0,0 +1,102 @@ +# Contributor: Ćukasz Jendrysik <scadu@yandex.com> +# Contributor: Matt Smith <mcs@darkregion.net> +# Contributor: Olivier Mauras <olivier@mauras.ch> +# Maintainer: Matt Smith <mcs@darkregion.net> +pkgname=pdns +pkgver=4.0.1 +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 mariadb-dev + postgresql-dev sqlite-dev" +install="$pkgname.pre-install $pkgname.post-deinstall" +subpackages="$pkgname-doc + $pkgname-backend-bind:backend_bind + $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 + 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/$pkgname \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --libdir=/usr/lib/pdns \ + --with-modules="" \ + --with-dynmodules="bind ldap gmysql gpgsql pipe gsqlite3" \ + --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/$pkgname/$pkgname.conf-dist + install -m600 -D "$srcdir"/$pkgname.conf \ + "$pkgdir"/etc/$pkgname/$pkgname.conf || return 1 + chown pdns:pdns "$pkgdir"/etc/$pkgname/$pkgname.conf || return 1 +} + +backend_bind() { _mv_backend bind; } +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" + depends="$pkgname" + + # 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="d34a390672aa043f8a287e5bb2284f4a pdns-4.0.1.tar.bz2 +db11dfe72474858f706155c817f2ded5 pdns.initd +351bac7f784a1a40e768466d9e6f1a79 pdns.conf" +sha256sums="d191eed4a6664430e85969f49835c59e810ecbb7b3eb506e64c6b2734091edd7 pdns-4.0.1.tar.bz2 +081835f812e419b153a9cc716ad55b9cb22c6c185b748e0aafc40430fa5e8b5e pdns.initd +5fdf423f829dca0b50bc81bab773d7ec4ee6627e35f861124d8c2ccd79a2f50c pdns.conf" +sha512sums="77fce9963a05198afeb569f92fbb0f6a1cb3426c28dd77b0921128189c80d9a72ebdbfc249dfc0b5b89cc7a65a83887a0388d6cc3461453b1e3096e563afdd1e pdns-4.0.1.tar.bz2 +71257be925fe57b15ebf29a7810cd70581cb867416ab9562300a1bbc3eb94fcb92ea2eb95f15e3ee3bd409468911077c50f90a2501801b0c8c49ed979f41f3a4 pdns.initd +9913551bb4d685aaced806134b1037d85ce759e7d9e780e256e67651d9d346aad5e608b4a45a4933f0ba879605b69d06e579c38b7f917f7a9be37c7797c5953b pdns.conf" |