summaryrefslogtreecommitdiff
path: root/package/pdnsd
diff options
context:
space:
mode:
Diffstat (limited to 'package/pdnsd')
-rw-r--r--package/pdnsd/Makefile30
-rw-r--r--package/pdnsd/files/pdnsd.conf30
-rw-r--r--package/pdnsd/files/pdnsd.conffiles1
-rw-r--r--package/pdnsd/files/pdnsd.init31
-rw-r--r--package/pdnsd/files/pdnsd.postinst3
5 files changed, 95 insertions, 0 deletions
diff --git a/package/pdnsd/Makefile b/package/pdnsd/Makefile
new file mode 100644
index 000000000..64757186b
--- /dev/null
+++ b/package/pdnsd/Makefile
@@ -0,0 +1,30 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= pdnsd
+PKG_VERSION:= 1.2.7
+PKG_RELEASE:= 2
+PKG_MD5SUM:= 114b3b21b09b43cbfcccdde726b84c12
+PKG_DESCR:= Proxy DNS server with permanent caching
+PKG_SECTION:= net
+PKG_DEPENDS:= libpthread
+PKG_URL:= http://www.phys.uu.nl/~rombouts/pdnsd.html
+PKG_SITES:= http://www.phys.uu.nl/~rombouts/pdnsd/releases/
+
+PKG_HOST_DEPENDS:= !netbsd
+
+DISTFILES:= ${PKG_NAME}-${PKG_VERSION}-par.tar.gz
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,PDNSD,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+post-install:
+ $(INSTALL_DIR) $(IDIR_PDNSD)/etc
+ ${INSTALL_DATA} ./files/pdnsd.conf ${IDIR_PDNSD}/etc/
+ $(INSTALL_DIR) $(IDIR_PDNSD)/usr/sbin
+ $(INSTALL_BIN) $(WRKINST)/usr/sbin/pdnsd{,-ctl} $(IDIR_PDNSD)/usr/sbin/
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/pdnsd/files/pdnsd.conf b/package/pdnsd/files/pdnsd.conf
new file mode 100644
index 000000000..00b548117
--- /dev/null
+++ b/package/pdnsd/files/pdnsd.conf
@@ -0,0 +1,30 @@
+global {
+ perm_cache=1024;
+ cache_dir="/var/cache/pdnsd"; # do not change this!
+ run_as="nobody";
+ server_ip = 127.0.0.1; # Use eth0 here if you want to allow other
+ # machines on your network to query pdnsd.
+ status_ctl = on;
+# paranoid=on; # This option reduces the chance of cache poisoning
+ # but may make pdnsd less efficient, unfortunately.
+ query_method=udp_tcp;
+ min_ttl=15m; # Retain cached entries at least 15 minutes.
+ max_ttl=1w; # One week.
+ timeout=10; # Global timeout option (10 seconds).
+}
+
+server {
+ label= "myisp";
+ ip = 192.168.0.1; # Put your ISP's DNS-server address(es) here.
+# proxy_only=on; # Do not query any name servers beside your ISP's.
+ # This may be necessary if you are behind some
+ # kind of firewall and cannot receive replies
+ # from outside name servers.
+ timeout=4; # Server timeout; this may be much shorter
+ # that the global timeout option.
+ uptest=if; # Test if the network interface is active.
+ interface=eth0; # The name of the interface to check.
+ interval=10m; # Check every 10 minutes.
+ purge_cache=off; # Keep stale cache entries in case the ISP's
+ # DNS servers go offline.
+}
diff --git a/package/pdnsd/files/pdnsd.conffiles b/package/pdnsd/files/pdnsd.conffiles
new file mode 100644
index 000000000..c2ae46acb
--- /dev/null
+++ b/package/pdnsd/files/pdnsd.conffiles
@@ -0,0 +1 @@
+/etc/pdnsd.conf
diff --git a/package/pdnsd/files/pdnsd.init b/package/pdnsd/files/pdnsd.init
new file mode 100644
index 000000000..0da77186d
--- /dev/null
+++ b/package/pdnsd/files/pdnsd.init
@@ -0,0 +1,31 @@
+#!/bin/sh
+#PKG pdnsd
+#INIT 60
+
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ test x"${pdnsd:-NO}" = x"NO" && exit 0
+ exec sh $0 start
+ ;;
+start)
+ [ -f /etc/pdnsd.conf ] || exit
+ mkdir -p /var/cache/pdnsd
+ pdnsd -s -t -d
+ ;;
+stop)
+ pkill pdnsd
+ ;;
+restart)
+ sh $0 stop
+ sleep 1
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?
diff --git a/package/pdnsd/files/pdnsd.postinst b/package/pdnsd/files/pdnsd.postinst
new file mode 100644
index 000000000..4d63fd712
--- /dev/null
+++ b/package/pdnsd/files/pdnsd.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf pdnsd pdnsd NO