aboutsummaryrefslogtreecommitdiffstats
path: root/main/pdnsd/APKBUILD
diff options
context:
space:
mode:
authorMatt Smith <mcs@darkregion.net>2011-03-29 23:41:13 -0500
committerMatt Smith <mcs@darkregion.net>2011-03-29 23:41:13 -0500
commit49897f4bda22343113903a5dd26d0e42aab54a80 (patch)
tree2079d324b5b0b920afef906ffcc4fe1df1818825 /main/pdnsd/APKBUILD
parent4346c9975804621d2e276ef1a12c0695dce71eb1 (diff)
downloadaports-49897f4bda22343113903a5dd26d0e42aab54a80.tar.bz2
aports-49897f4bda22343113903a5dd26d0e42aab54a80.tar.xz
main/pdnsd: moved from testing
Diffstat (limited to 'main/pdnsd/APKBUILD')
-rw-r--r--main/pdnsd/APKBUILD101
1 files changed, 101 insertions, 0 deletions
diff --git a/main/pdnsd/APKBUILD b/main/pdnsd/APKBUILD
new file mode 100644
index 0000000000..cdc494cb44
--- /dev/null
+++ b/main/pdnsd/APKBUILD
@@ -0,0 +1,101 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=pdnsd
+pkgver=1.2.8
+_realver=$pkgver-par
+pkgrel=0
+pkgdesc="A proxy DNS server with permanent caching"
+url="http://www.phys.uu.nl/~rombouts/pdnsd/"
+arch="all"
+license="GPL"
+depends=
+depends_dev=
+makedepends="$depends_dev"
+install="$pkgname.pre-install $pkgname.post-deinstall"
+subpackages="$pkgname-doc"
+pkgusers="pdnsd"
+pkggroups="pdnsd"
+source="http://www.phys.uu.nl/~rombouts/pdnsd/releases/$pkgname-$_realver.tar.gz
+ pdnsd.initd
+ pdnsd.confd
+ pdnsd.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 \
+ --enable-ipv6 \
+ --with-random-device=/dev/urandom \
+ --enable-tcp-subseq \
+ || 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
+ install -m644 -D "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname || return 1
+ install -m644 -D "$srcdir"/$pkgname.conf \
+ "$pkgdir"/etc/$pkgname.conf || return 1
+
+ chown -R pdnsd "$pkgdir"/var/cache/pdnsd || return 1
+ sed -ri 's/([ ]*run_as=)"nobody";/\1"pdnsd";/' \
+ "$pkgdir"/etc/pdnsd.conf.sample || return 1
+ sed -ri '/pid_file/d' "$pkgdir"/etc/pdnsd.conf.sample || return 1
+ sed -ri '/query_method/d' "$pkgdir"/etc/pdnsd.conf.sample || return 1
+}
+
+doc() {
+ arch="noarch"
+
+ mkdir -p "$subpkgdir"/usr/share/doc/$pkgname/html || return 1
+ mkdir -p "$subpkgdir"/usr/share/doc/$pkgname/txt || return 1
+ mkdir -p "$subpkgdir"/usr/share/$pkgname/contrib || return 1
+
+ # /usr/share/{man,doc/$pkgname}
+ cp -a "$pkgdir"/usr/share/ "$subpkgdir"/usr/ || return 1
+ rm -rf "$pkgdir"/usr/share/ || return 1
+ _docs="AUTHORS COPYING COPYING.BSD ChangeLog ChangeLog.old \
+ NEWS README README.par README.par.old THANKS TODO"
+ for _doc in $_docs; do
+ cp "$_builddir"/$_doc "$subpkgdir"/usr/share/doc/$pkgname/ \
+ || return 1
+ done
+ cp -R "$_builddir"/doc/html/* \
+ "$subpkgdir"/usr/share/doc/$pkgname/html/ || return 1
+ cp -R "$_builddir"/doc/txt/* \
+ "$subpkgdir"/usr/share/doc/$pkgname/txt/ || return 1
+
+ # /usr/share/$pkgname
+ mv "$pkgdir"/etc/pdnsd.conf.sample \
+ "$subpkgdir"/usr/share/$pkgname/ || return 1
+ _contribs="README change_pdnsd_server_ip.pl dhcp2pdnsd pdnsd_dhcp.pl"
+ for _contrib in $_contribs; do
+ cp -a "$_builddir"/contrib/$_contrib \
+ "$subpkgdir"/usr/share/$pkgname/contrib/ || return 1
+ done
+}
+
+md5sums="779c5d19576e561fbf2455de435e5597 pdnsd-1.2.8-par.tar.gz
+14d6c0a1e9e552999cc4efb2c1251d98 pdnsd.initd
+4bced9066febfe33b4a527f28cfb6a48 pdnsd.confd
+f7cf4b9391b67ee421485a0c24aa8a5c pdnsd.conf"