aboutsummaryrefslogtreecommitdiff
path: root/network
diff options
context:
space:
mode:
authorAndré Geraldo Vieira <andre.geraldo@gmail.com>2010-05-12 23:32:39 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-12 23:32:39 +0200
commitdcfc8298b253229af2f918842754ef61650698b7 (patch)
tree0decf36776499766709153945bba7dc2a9a4f30d /network
parent4ecb4572b7ec201523db30d821d24da770ee73af (diff)
network/pdnsd: Added to 12.2 repository
Diffstat (limited to 'network')
-rw-r--r--network/pdnsd/README13
-rw-r--r--network/pdnsd/doinst.sh23
-rw-r--r--network/pdnsd/pdnsd.SlackBuild86
-rw-r--r--network/pdnsd/pdnsd.info8
-rw-r--r--network/pdnsd/rc.pdnsd78
-rw-r--r--network/pdnsd/slack-desc19
6 files changed, 227 insertions, 0 deletions
diff --git a/network/pdnsd/README b/network/pdnsd/README
new file mode 100644
index 000000000000..f11b7d39eab4
--- /dev/null
+++ b/network/pdnsd/README
@@ -0,0 +1,13 @@
+pdnsd is a proxy DNS server with permanent caching (the cache contents are
+written to hard disk on exit) that is designed to cope with unreachable or
+down DNS servers (e.g., in dial-in networking).
+
+Add this to /etc/rc.d/rc.local:
+if [ -x /etc/rc.d/rc.pdnsd ]; then
+ /etc/rc.d/rc.pdnsd start
+fi
+
+Add this to /etc/rc.d/rc.local_shutdown
+if [ -x /etc/rc.d/rc.pdnsd ]; then
+ /etc/rc.d/rc.pdnsd stop
+fi
diff --git a/network/pdnsd/doinst.sh b/network/pdnsd/doinst.sh
new file mode 100644
index 000000000000..b09bee1dad33
--- /dev/null
+++ b/network/pdnsd/doinst.sh
@@ -0,0 +1,23 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+# Keep same perms on rc.pdnsd.new:
+if [ -e etc/rc.d/rc.pdnsd ]; then
+ cp -a etc/rc.d/rc.pdnsd etc/rc.d/rc.pdnsd.new.incoming
+ cat etc/rc.d/rc.pdnsd.new > etc/rc.d/rc.pdnsd.new.incoming
+ mv etc/rc.d/rc.pdnsd.new.incoming etc/rc.d/rc.pdnsd.new
+fi
+
+config etc/rc.d/rc.pdnsd.new
+config etc/pdnsd.conf.new
+
diff --git a/network/pdnsd/pdnsd.SlackBuild b/network/pdnsd/pdnsd.SlackBuild
new file mode 100644
index 000000000000..5acfacfff8a2
--- /dev/null
+++ b/network/pdnsd/pdnsd.SlackBuild
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+# Slackware build script for pdnsd
+
+# Written by André Geraldo Vieira <andre.geraldo@gmail.com>
+
+PRGNAM=pdnsd
+VERSION=${VERSION:-1.2.7}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-3}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
+
+set -e # Exit on most errors
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION-par.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --enable-ipv6 \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
+)
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+# Install an init script
+mkdir -p $PKG/etc/rc.d/
+cat $CWD/rc.pdnsd > $PKG/etc/rc.d/rc.pdnsd.new
+chmod 0755 $PKG/etc/rc.d/rc.pdnsd.new
+
+# Rename pdnsd.conf.sample to pdnsd.conf.new
+mv $PKG/etc/pdnsd.conf.sample $PKG/etc/pdnsd.conf.new
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS ChangeLog* COPYING* INSTALL NEWS PKGBUILD README* THANKS TODO \
+ version doc/html doc/txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
diff --git a/network/pdnsd/pdnsd.info b/network/pdnsd/pdnsd.info
new file mode 100644
index 000000000000..d3f7972e478e
--- /dev/null
+++ b/network/pdnsd/pdnsd.info
@@ -0,0 +1,8 @@
+PRGNAM="pdnsd"
+VERSION="1.2.7"
+HOMEPAGE="http://www.phys.uu.nl/~rombouts/pdnsd/"
+DOWNLOAD="http://www.phys.uu.nl/~rombouts/pdnsd/releases/pdnsd-1.2.7-par.tar.gz"
+MD5SUM="114b3b21b09b43cbfcccdde726b84c12"
+MAINTAINER="André Geraldo Vieira"
+EMAIL="andre.geraldo@gmail.com"
+APPROVED="dsomero"
diff --git a/network/pdnsd/rc.pdnsd b/network/pdnsd/rc.pdnsd
new file mode 100644
index 000000000000..64115e1cb54a
--- /dev/null
+++ b/network/pdnsd/rc.pdnsd
@@ -0,0 +1,78 @@
+#!/bin/bash
+#
+# /etc/rc.d/rc.pdnsd
+#
+# Starts the Proxy DNS Daemon
+#
+# description: Proxy DNS Daemon
+# processname: pdnsd
+# config: /etc/pdnsd.conf
+# distribution: Slackware
+# author: André Geraldo Vieira <andre.geraldo@gmail.com>
+#
+# Additional info:
+# 1) put these lines in the /etc/rc.d/rc.local:
+# if [ -x /etc/rc.d/rc.pdnsd ]; then
+# /etc/rc.d/rc.pdnsd start
+# fi
+#
+# 2) put these lines in the /etc/rc.d/rc.local_shutdown:
+# if [ -x /etc/rc.d/rc.pdnsd ]; then
+# /etc/rc.d/rc.pdnsd stop
+# fi
+
+start() {
+ if ! [ -r /var/run/pdnsd.pid ]; then
+ echo -n 'Starting pdnsd...'
+ /usr/sbin/pdnsd -d -p /var/run/pdnsd.pid
+ echo 'OK'
+ else
+ echo 'The PDNSD is already running!'
+ fi
+}
+
+stop() {
+ if [ -r /var/run/pdnsd.pid ]; then
+ echo -n "Shutting down pdnsd... "
+ kill -15 `cat /var/run/pdnsd.pid` && rm -f /var/run/pdnsd.pid 2> /dev/null
+ echo ' OK'
+ else
+ echo 'The PDNSD already stopped!'
+ fi
+}
+
+restart() {
+ stop
+ sleep 3
+ start
+}
+
+status() {
+ if [ -r /var/run/pdnsd.pid ]; then
+ pid=`cat /var/run/pdnsd.pid`
+ echo "PDNSD (pid $pid) is running."
+ else
+ echo 'PDNSD is stopped.'
+ fi
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ reload|restart)
+ restart
+ ;;
+ status)
+ status
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|reload|status}"
+ exit 1
+ ;;
+esac
+exit 0
+#EOF
diff --git a/network/pdnsd/slack-desc b/network/pdnsd/slack-desc
new file mode 100644
index 000000000000..4ca0c3fbe6d8
--- /dev/null
+++ b/network/pdnsd/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |--------handy-ruler-----------------------------------------------------|
+pdnsd: pdnsd (proxy dns server)
+pdnsd:
+pdnsd: pdnsd is a proxy DNS server with permanent caching (the cache contents
+pdnsd: are written to hard disk on exit) that is designed to cope with
+pdnsd: unreachable or down DNS servers (for example in dial-in networking).
+pdnsd: Since version 1.1.0, pdnsd supports negative caching.
+pdnsd:
+pdnsd: pdnsd is licensed under the GNU General Public License (GPL).
+pdnsd:
+pdnsd:
+pdnsd: