summaryrefslogtreecommitdiffstats
path: root/network/pdns-recursor
diff options
context:
space:
mode:
Diffstat (limited to 'network/pdns-recursor')
-rw-r--r--network/pdns-recursor/README2
-rw-r--r--network/pdns-recursor/pdns-recursor.SlackBuild40
-rw-r--r--network/pdns-recursor/pdns-recursor.info8
-rw-r--r--network/pdns-recursor/rc.pdns-recursor103
4 files changed, 133 insertions, 20 deletions
diff --git a/network/pdns-recursor/README b/network/pdns-recursor/README
index 3a1cfac545..7ccb18857d 100644
--- a/network/pdns-recursor/README
+++ b/network/pdns-recursor/README
@@ -10,3 +10,5 @@ From the pdns-recursor README:
100 million internet connections.
Docs are available at http://doc.powerdns.com/built-in-recursor.html
+
+Optional dependencies are protobuf, lua and ragel.
diff --git a/network/pdns-recursor/pdns-recursor.SlackBuild b/network/pdns-recursor/pdns-recursor.SlackBuild
index 65c6997d5f..8f62763a40 100644
--- a/network/pdns-recursor/pdns-recursor.SlackBuild
+++ b/network/pdns-recursor/pdns-recursor.SlackBuild
@@ -21,14 +21,16 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Modified by the SlackBuilds.org project
+
PRGNAM=pdns-recursor
-VERSION=${VERSION:-3.2}
+VERSION=${VERSION:-4.0.4}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -39,8 +41,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -63,29 +65,35 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -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 {} \;
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-OPTFLAGS="$SLKCFLAGS" \
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc/powerdns \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
-mv $PKG/usr/share/man $PKG/usr/man
+
mv $PKG/etc/powerdns/recursor.conf-dist $PKG/etc/powerdns/recursor.conf.new
-mv $PKG/etc/init.d $PKG/etc/rc.d
-mv $PKG/etc/rc.d/pdns-recursor $PKG/etc/rc.d/rc.pdns-recursor.new
+install -m 0644 -D $CWD/rc.pdns-recursor $PKG/etc/rc.d/rc.pdns-recursor.new
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- README \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING NOTICE README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/network/pdns-recursor/pdns-recursor.info b/network/pdns-recursor/pdns-recursor.info
index 524af92790..c3aecdb3ac 100644
--- a/network/pdns-recursor/pdns-recursor.info
+++ b/network/pdns-recursor/pdns-recursor.info
@@ -1,8 +1,8 @@
PRGNAM="pdns-recursor"
-VERSION="3.2"
-HOMEPAGE="http://www.powerdns.com/content/home-powerdns.aspx"
-DOWNLOAD="http://downloads.powerdns.com/releases/pdns-recursor-3.2.tar.bz2"
-MD5SUM="7e14d9487664d58c27448ae26e824215"
+VERSION="4.0.4"
+HOMEPAGE="https://www.powerdns.com"
+DOWNLOAD="https://downloads.powerdns.com/releases/pdns-recursor-4.0.4.tar.bz2"
+MD5SUM="7bc78f05154c4c822ab09117f96d819c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/network/pdns-recursor/rc.pdns-recursor b/network/pdns-recursor/rc.pdns-recursor
new file mode 100644
index 0000000000..791ed5026a
--- /dev/null
+++ b/network/pdns-recursor/rc.pdns-recursor
@@ -0,0 +1,103 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: pdns-recursor
+# Required-Start: $network $remote_fs $syslog
+# Required-Stop: $network $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: PowerDNS Recursor
+### END INIT INFO
+# chkconfig: - 80 75
+# description: pdns_recursor is a versatile high performance recursing nameserver
+
+BINARYPATH=/usr/bin
+SBINARYPATH=/usr/sbin
+SOCKETPATH=/var/run
+
+pdns_server=$SBINARYPATH/pdns_recursor
+
+[ -f "$pdns_server" ] || exit 0
+
+doPC()
+{
+ ret=`$BINARYPATH/rec_control $EXTRAOPTS $1 $2 2> /dev/null`
+}
+
+
+doPC ping
+NOTRUNNING=$?
+
+case "$1" in
+ status)
+ if test "$NOTRUNNING" = "0"
+ then
+ echo "running"
+ exit 0
+ else
+ echo "not running"
+ # Note: 3 is a white lie. We currently don't *really*
+ # know that it's not running, or if the ping failed for
+ # other reasons (= 4).
+ exit 3
+ fi
+ ;;
+
+ stop)
+ echo -n "Stopping PowerDNS recursing nameserver: "
+ if test "$NOTRUNNING" = "0"
+ then
+ doPC quit
+ echo $ret
+ else
+ echo "not running"
+ exit 1
+ fi
+ ;;
+
+
+ force-stop)
+ echo -n "Stopping PowerDNS recursing nameserver: "
+ killall -v -9 $pdns_server
+ echo "killed"
+ ;;
+
+ start)
+ echo -n "Starting PowerDNS recursing nameserver: "
+ if test "$NOTRUNNING" = "0"
+ then
+ echo "already running"
+ exit 1
+ else
+ $pdns_server --daemon
+ if test "$?" = "0"
+ then
+ echo "started"
+ fi
+ fi
+ ;;
+
+ force-reload | restart)
+ echo -n "Restarting PowerDNS recursing nameserver: "
+ echo -n stopping and waiting..
+ doPC quit
+ sleep 3
+ echo done
+ $0 start
+ ;;
+
+ monitor)
+ if test "$NOTRUNNING" = "0"
+ then
+ echo "already running"
+ else
+ $pdns_server --daemon=no --quiet=no --control-console --loglevel=9
+ fi
+ ;;
+
+ *)
+ echo pdns [start\|stop\|force-reload\|restart\|status\|monitor]
+
+ ;;
+esac
+
+