aboutsummaryrefslogtreecommitdiffstats
path: root/testing/gross-svn
diff options
context:
space:
mode:
authorCarlo Lanmdeter <clandmeter@gmail>2009-03-16 10:10:10 +0000
committerCarlo Lanmdeter <clandmeter@gmail>2009-03-16 10:10:10 +0000
commit6324e99c2889ebd4d919397d1d4d777ef7b3b8da (patch)
treeca0b016451713b28f19a6cfff7c6d8965a47c8b7 /testing/gross-svn
parent8583a1f760a8e4617f85323b0ee73cfcfc4c4839 (diff)
downloadaports-6324e99c2889ebd4d919397d1d4d777ef7b3b8da.tar.bz2
aports-6324e99c2889ebd4d919397d1d4d777ef7b3b8da.tar.xz
testing/gross-svn: moved from extra to testing
Diffstat (limited to 'testing/gross-svn')
-rw-r--r--testing/gross-svn/APKBUILD33
-rw-r--r--testing/gross-svn/gross-svn.confd8
-rw-r--r--testing/gross-svn/gross-svn.initd31
3 files changed, 72 insertions, 0 deletions
diff --git a/testing/gross-svn/APKBUILD b/testing/gross-svn/APKBUILD
new file mode 100644
index 0000000000..ef00280986
--- /dev/null
+++ b/testing/gross-svn/APKBUILD
@@ -0,0 +1,33 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
+pkgname=gross-svn
+pkgver=511
+pkgrel=0
+pkgdesc="Greylisting of suspicious sources"
+url="http://code.google.com/p/gross/"
+license="BSD"
+depends=""
+makedepends="c-ares"
+subpackages="$pkgname-doc $pkgname-dev"
+source="http://alpine.nethq.org/clandmeter/src/${pkgname}-${pkgver}.tar.bz2
+$pkgname.initd
+$pkgname.confd"
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info
+ make || return 1
+ make -j1 DESTDIR="$pkgdir" install
+
+ install -dD -onobody -gnobody "$pkgdir"/var/run/grossd
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/gross
+ install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/gross
+}
+
+md5sums="f2488ced5b47f359c3a1127d9ba3453c gross-svn-511.tar.bz2
+c5fbd3396e901c5e35e3961deb0b36b6 gross-svn.initd
+b95f2fba652bc93022ad87cffd096f84 gross-svn.confd"
diff --git a/testing/gross-svn/gross-svn.confd b/testing/gross-svn/gross-svn.confd
new file mode 100644
index 0000000000..bb52e1f194
--- /dev/null
+++ b/testing/gross-svn/gross-svn.confd
@@ -0,0 +1,8 @@
+#
+# Specify daemon $OPTS here.
+#
+
+OPTS=""
+USER="nobody"
+GROUP="nobody"
+
diff --git a/testing/gross-svn/gross-svn.initd b/testing/gross-svn/gross-svn.initd
new file mode 100644
index 0000000000..677d44997f
--- /dev/null
+++ b/testing/gross-svn/gross-svn.initd
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+
+NAME=grossd
+DAEMON=/usr/sbin/$NAME
+
+depend() {
+ need net
+}
+
+check_config() {
+ if [ ! -e /var/db/gross/ ] ; then
+ einfo "Generating Gross database..."
+ install -dD -o${USER} -g${GROUP} /var/db/gross
+ ${DAEMON} -Cf /etc/grossd.conf > /dev/null
+ fi
+}
+
+start() {
+ check_config || return 1
+ ebegin "Starting ${NAME}"
+ start-stop-daemon --start --quiet --background \
+ --exec ${DAEMON} -- ${OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${NAME}"
+ start-stop-daemon --stop --pidfile /var/run/grossd/grossd.pid
+ eend $?
+}
+