diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2015-12-22 13:37:53 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2015-12-22 13:37:57 +0000 |
commit | 9b436124152f1dbf8bc5550a404cf564713e562d (patch) | |
tree | 6a9c48a4927f4c66e2763eb2ea59ebdaeee6573d | |
parent | 3f9dc4f4288ebdbcf2680465617abcdafbe010b8 (diff) | |
download | aports-9b436124152f1dbf8bc5550a404cf564713e562d.tar.bz2 aports-9b436124152f1dbf8bc5550a404cf564713e562d.tar.xz |
testing/powerdns: new aport
-rw-r--r-- | testing/powerdns/APKBUILD | 64 | ||||
-rw-r--r-- | testing/powerdns/pdns.conf | 15 | ||||
-rw-r--r-- | testing/powerdns/powerdns.initd | 61 |
3 files changed, 140 insertions, 0 deletions
diff --git a/testing/powerdns/APKBUILD b/testing/powerdns/APKBUILD new file mode 100644 index 0000000000..233bf85250 --- /dev/null +++ b/testing/powerdns/APKBUILD @@ -0,0 +1,64 @@ +# Contributor: Francesco Colista <fcolista@alpinelinux.org> +# Maintainer: Francesco Colista <fcolista@alpinelinux.org> +pkgname=powerdns +pkgver=3.4.7 +pkgrel=0 +pkgdesc="Authoritative DNS server" +url="http://www.powerdns.com/" +arch="all" +license="GPL" +depends="" +depends_dev="" +makedepends="$depends_dev lua-dev sqlite-dev openldap-dev boost-dev + postgresql-dev mariadb-dev" +install="" +subpackages="$pkgname-doc" +source="http://downloads.powerdns.com/releases/pdns-$pkgver.tar.bz2 + pdns.conf + $pkgname.initd" + +_builddir="$srcdir"/pdns-$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/powerdns \ + --libexecdir=/usr/lib \ + --libdir=/usr/lib \ + --mandir=/usr/share/man \ + --with-modules='' \ + --with-dynmodules="ldap pipe gmysql gpgsql gsqlite3 geo bind" \ + --docdir=/usr/share/doc/powerdns \ + --sbindir=/usr/bin \ + --bindir=/usr/bin + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install + mv "$pkgdir/usr/lib/pdns" "$pkgdir/usr/lib/powerdns" + rm -f "$pkgdir/etc/powerdns/pdns.conf-dist" + install -Dm644 "$srcdir"/pdns.conf "$pkgdir"/etc/powerdns + install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname +} + +md5sums="e58d4a391f76f8a8d71ea668fd1ac81e pdns-3.4.7.tar.bz2 +3ff97c0004415c842839db3d5c31f81f pdns.conf +9a3da740cefbf6b89b6e09605643952a powerdns.initd" +sha256sums="e17eca86c5e702b54b62b1edebc4741d8e0db748050a7214c778302039f28c4b pdns-3.4.7.tar.bz2 +1d3782c1b3e80238cdaa22ad206dce581607cc1c8c664fc8a883e4d6af2acb5e pdns.conf +f953b418e93a774d586289ba5c5fcbbc8f943b4ac4d770e21d47bcd45a9aa7a3 powerdns.initd" +sha512sums="d9dd8e7d37ae6d46783d9608beba2905838d1af8c597906bfe1134e2b787cfc529514f412eebb8838df5ceb1a7366c10057fd1d93b73924d0f6d2cec6ba72e13 pdns-3.4.7.tar.bz2 +65d801723cd89e3690f2576cb36bd3ed497f51d0a110be9e1b91e88597734e11ddd6f977ec36a1b5035951abb6817f6b6a1f346528770ce5264de111ff2873df pdns.conf +5b58e1e47310711d8954b6d6beb1564ab5754746bb7907d19f6a9f7b2f6e35fd385d7d6603c495c8f822df2264835bc812044ff5eb7b4df5f9ab7406b4b79f43 powerdns.initd" diff --git a/testing/powerdns/pdns.conf b/testing/powerdns/pdns.conf new file mode 100644 index 0000000000..04a07c34f5 --- /dev/null +++ b/testing/powerdns/pdns.conf @@ -0,0 +1,15 @@ +allow-recursion=127.0.0.1 +cache-ttl=6 +chroot=/var/empty +config-dir=/etc +daemon=yes +distributor-threads=3 +guardian=yes +local-port=53 +loglevel=3 +module-dir=/usr/lib/powerdns +negquery-cache-ttl=60 +setgid=nobody +setuid=nobody +socket-dir=/var/run +webserver=no diff --git a/testing/powerdns/powerdns.initd b/testing/powerdns/powerdns.initd new file mode 100644 index 0000000000..2c149361db --- /dev/null +++ b/testing/powerdns/powerdns.initd @@ -0,0 +1,61 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dns/pdns/files/pdns,v 1.11 2011/12/04 10:12:32 swegener Exp $ + +extra_commands="monitor" +extra_started_commands="reload dump" + +PDNS_INSTANCE="${SVCNAME#pdns[.-]}" +PDNS_CONFIG="" + +if [ -n "${PDNS_INSTANCE}" ] && [ "${PDNS_INSTANCE}" != "pdns" ] +then + PDNS_CONFIG="--config-name=${PDNS_INSTANCE}" +else + PDNS_INSTANCE="default" +fi + +depend() { + need net +} + +start() { + ebegin "Starting PowerDNS (${PDNS_INSTANCE})" + /usr/sbin/pdns_server \ + ${PDNS_CONFIG} \ + --daemon=yes \ + --guardian=yes + eend $? +} + +stop() { + ebegin "Stopping PowerDNS (${PDNS_INSTANCE})" + /usr/bin/pdns_control ${PDNS_CONFIG} quit &>/dev/null + eend $? +} + +reload() { + ebegin "Reloading PowerDNS (${PDNS_INSTANCE})" + /usr/bin/pdns_control ${PDNS_CONFIG} cycle &>/dev/null + eend $? +} + +dump() { + ebegin "Dumping PowerDNS (${PDNS_INSTANCE}) variables" + /usr/bin/pdns_control ${PDNS_CONFIG} list + eend $? +} + +monitor() { + ebegin "Starting PowerDNS (${PDNS_INSTANCE}) in monitor mode" + /usr/sbin/pdns_server \ + ${PDNS_CONFIG} \ + --daemon=no \ + --guardian=no \ + --control-console=yes \ + --loglevel=9 \ + --log-dns-details=yes \ + --query-logging=yes + eend $? +} |