summaryrefslogtreecommitdiffstats
path: root/main/pdnsd/APKBUILD
diff options
context:
space:
mode:
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 000000000..cdc494cb4
--- /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"