From 3beeaef56aeb6a5731185d9d26a8b5230d59a661 Mon Sep 17 00:00:00 2001 From: Michael Mason Date: Tue, 30 Mar 2010 15:15:18 +0000 Subject: testing/rtapd added. Makefile support postgres --- testing/rtapd/APKBUILD | 41 +++++++++++++++++++++++++++++++++++++++++ testing/rtapd/Makefile.patch | 13 +++++++++++++ testing/rtapd/rtapd.confd | 1 + testing/rtapd/rtapd.initd | 20 ++++++++++++++++++++ 4 files changed, 75 insertions(+) create mode 100644 testing/rtapd/APKBUILD create mode 100644 testing/rtapd/Makefile.patch create mode 100644 testing/rtapd/rtapd.confd create mode 100644 testing/rtapd/rtapd.initd (limited to 'testing') diff --git a/testing/rtapd/APKBUILD b/testing/rtapd/APKBUILD new file mode 100644 index 00000000..f568fb76 --- /dev/null +++ b/testing/rtapd/APKBUILD @@ -0,0 +1,41 @@ +# Contributor: Michael Mason +# Maintainer: Michael Mason +pkgname=rtapd +_altpkgname="rtnppd" +_builddir="$pkgname" +pkgver=1.7 +pkgrel=0 +pkgdesc="daemon for routing packets to rtnppd" +url="http://sourceforge.net/projects/rtnppd/" +license="GPL" +depends="" +makedepends="postgresql-dev" +install= +subpackages="" +source="http://downloads.sourceforge.net/$_altpkgname/$pkgname-$pkgver.tar.gz + Makefile.patch + $pkgname.initd + $pkgname.confd" + +build() { + cd "$srcdir"/"$_builddir" + echo "Applying Patch" + patch -p1 < ../Makefile.patch || return 1 + make || return 1 +} +package() { + cd "$srcdir"/"$_builddir" + #make DESTDIR="$pkgdir" install + install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname + install -m755 -D ./rtapd "$pkgdir"/usr/sbin/rtapd + install -m755 -D ./vsnppd "$pkgdir"/usr/sbin/vsnppd + install -m644 -D ./rtapd.conf "$pkgdir"/etc/rtnppd/rtapd.conf + install -m644 -D ./tap_dev.conf "$pkgdir"/etc/rtnppd/tap_dev.conf + install -m644 -D ./tap_route.conf "$pkgdir"/etc/rtnppd/tag_route.conf +} + +md5sums="f3354efde507d29813754c8f4af7fa02 rtapd-1.7.tar.gz +7ea62a8bb13e2069164d8639b8c02aad Makefile.patch +bd5aa6b7477064be5966962b90be55b5 rtapd.initd +4378fc49b27dcc6ab7f2316ea2453338 rtapd.confd" diff --git a/testing/rtapd/Makefile.patch b/testing/rtapd/Makefile.patch new file mode 100644 index 00000000..197cce50 --- /dev/null +++ b/testing/rtapd/Makefile.patch @@ -0,0 +1,13 @@ +--- rtapd.orig/Makefile Tue Mar 30 15:10:02 2010 ++++ rtapd/Makefile Tue Mar 30 15:10:11 2010 +@@ -23,8 +23,8 @@ + + # Use PostgreSQL-server (with includes in /usr/include/pgsql + # and libs in /usr/lib +-#CFLAGS = -DUSE_POSTGRESQL -I/usr/include/pgsql +-#LIBS = -lpq ++CFLAGS = -DUSE_POSTGRESQL -I/usr/include/pgsql ++LIBS = -lpq + + PREFIX = /usr/local + INCLUDES = -I./ diff --git a/testing/rtapd/rtapd.confd b/testing/rtapd/rtapd.confd new file mode 100644 index 00000000..4c0047b1 --- /dev/null +++ b/testing/rtapd/rtapd.confd @@ -0,0 +1 @@ +#RTAPD_OPTS="" diff --git a/testing/rtapd/rtapd.initd b/testing/rtapd/rtapd.initd new file mode 100644 index 00000000..01fce242 --- /dev/null +++ b/testing/rtapd/rtapd.initd @@ -0,0 +1,20 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +DAEMON=/usr/sbin/rtapd +USER=rtnppd + +start() { + ebegin "Starting $(basename $DAEMON)" + start-stop-daemon --start --user ${USER} --exec ${DAEMON} \ + -- -C /etc/rtnppd/rtapd.conf ${RTAPD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping $(basename $DAEMON)" + start-stop-daemon --stop --exec ${DAEMON} + eend $? +} -- cgit v1.2.3