[arch-commits] Commit in rbldnsd/trunk (4 files)

Eric Bélanger eric at archlinux.org
Tue Apr 28 02:07:16 EDT 2009


    Date: Tuesday, April 28, 2009 @ 02:07:16
  Author: eric
Revision: 36862

upgpkg: rbldnsd 0.996b-1
    Upstream update, Added license, Added backup array, Added man page, Added daemon script (close FS#12458)

Added:
  rbldnsd/trunk/conf.rbldnsd
  rbldnsd/trunk/rc.rbldnsd
Modified:
  rbldnsd/trunk/PKGBUILD
  rbldnsd/trunk/rbldnsd.install

-----------------+
 PKGBUILD        |   26 +++++++++++++++++---------
 conf.rbldnsd    |    8 ++++++++
 rbldnsd.install |    5 -----
 rc.rbldnsd      |   43 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 68 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-04-28 05:55:53 UTC (rev 36861)
+++ PKGBUILD	2009-04-28 06:07:16 UTC (rev 36862)
@@ -2,24 +2,32 @@
 # Contributor: Dale Blount <dale at archlinux.org>
 # Maintainer: Dale Blount <dale at archlinux.org>
 pkgname=rbldnsd
-pkgver=0.996
+pkgver=0.996b
 pkgrel=1
 pkgdesc="Small and fast DNS daemon which is especially made to serve DNSBL zones"
 arch=(i686 x86_64)
+url="http://www.corpit.ru/mjt/rbldnsd.html"
+license=('GPL')
 depends=('zlib')
-backup=()
-install="$pkgname.install"
-url="http://www.corpit.ru/mjt/rbldnsd.html"
-source=(http://www.corpit.ru/mjt/$pkgname/${pkgname}_${pkgver}.tar.gz)
-md5sums=('adba618d40a724a4d07a9b176d86b645')
+backup=('etc/conf.d/rbldnsd')
+options=('force')
+install=$pkgname.install
+source=(http://www.corpit.ru/mjt/$pkgname/${pkgname}_${pkgver}.tar.gz rc.rbldnsd conf.rbldnsd)
+md5sums=('9a0f26f3b33764c325a96bd4c61b26fa' '1d197df99197244290217288b1a91c38'\
+         '8fc8131d235a938a1e8024ab85dc93ea')
 
 build() {
-	cd $startdir/src/$pkgname-$pkgver
+	cd $srcdir/$pkgname-$pkgver
 	./configure || return 1
 	make || return 1
-	mkdir -p $startdir/pkg/var/lib/rbldns/logs
+
+	install -d $pkgdir/var/lib/rbldns/logs
 	chown 59:59 $startdir/pkg/var/lib/rbldns || return 1
 	chown 58:58 $startdir/pkg/var/lib/rbldns/logs || return 1
 	chmod 0711 -R $startdir/pkg/var/lib/rbldns
-	install -D -m 0755 rbldnsd $startdir/pkg/usr/bin/rbldnsd || return 1
+
+	install -D -m 0755 rbldnsd $pkgdir/usr/bin/rbldnsd || return 1
+	install -D -m 0644 rbldnsd.8 $pkgdir/usr/share/man/man8/rbldnsd.8 || return 1
+	install -D -m 0644 $srcdir/conf.rbldnsd $pkgdir/etc/conf.d/rbldnsd || return 1
+	install -D -m 0755 $srcdir/rc.rbldnsd $pkgdir/etc/rc.d/rbldnsd || return 1
 }

Added: conf.rbldnsd
===================================================================
--- conf.rbldnsd	                        (rev 0)
+++ conf.rbldnsd	2009-04-28 06:07:16 UTC (rev 36862)
@@ -0,0 +1,8 @@
+#
+# Arguments passed to rbldnsd. See man 8 rbldnsd
+#
+
+RBLDNSD_ARGS="-u rbldns:rbldns -r /var/lib/rbldns -b 127.0.0.1/53"
+
+# You need to specify at least one zone to serve, for example:
+# be.surbl.org:dnset:be.surbl.org.rbldnsd.

Modified: rbldnsd.install
===================================================================
--- rbldnsd.install	2009-04-28 05:55:53 UTC (rev 36861)
+++ rbldnsd.install	2009-04-28 06:07:16 UTC (rev 36862)
@@ -27,8 +27,3 @@
     userdel rbldnszones &> /dev/null
     groupdel rbldnszones &> /dev/null
 }
-
-op=$1
-shift
-
-$op $*

Added: rc.rbldnsd
===================================================================
--- rc.rbldnsd	                        (rev 0)
+++ rc.rbldnsd	2009-04-28 06:07:16 UTC (rev 36862)
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/rbldnsd
+
+PID=$(pidof -o %PPID /usr/bin/rbldnsd)
+
+case $1 in
+    start)
+	stat_busy "Starting rbldnsd"
+	[ -z "$PID" ] && /usr/bin/rbldnsd $RBLDNSD_ARGS &> /dev/null
+	if [ $? -gt 0 ]; then
+	    stat_fail
+	else
+	    add_daemon rbldnsd
+	    stat_done
+	fi
+	;;
+
+    stop)
+	stat_busy "Stopping rbldnsd"
+	[ ! -z "$PID" ]  && /bin/kill $PID &>/dev/null
+	if [ $? -gt 0 ]; then
+	    stat_fail
+	else
+	    rm_daemon rbldnsd
+	    stat_done
+	fi
+	;;
+
+    restart)
+	$0 stop
+	$0 start
+	;;
+
+    *)
+	echo "usage: $0 {start|stop|restart}"
+	exit 1
+
+esac
+
+exit 0



More information about the arch-commits mailing list