aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@gmail.com>2010-04-05 08:38:35 +0000
committerLeonardo Arena <rnalrd@gmail.com>2010-04-05 08:38:35 +0000
commit8dba87a30aa384eb62dc978ad52fa8c9e0b11925 (patch)
tree60bbd07e0998232843c64fcfc4cf5ee4955ece0c /testing
parent67eb88bc5458c93a481c692baa0968cf567fc3f2 (diff)
downloadaports-8dba87a30aa384eb62dc978ad52fa8c9e0b11925.tar.bz2
aports-8dba87a30aa384eb62dc978ad52fa8c9e0b11925.tar.xz
testing/pmacct: new aport
Diffstat (limited to 'testing')
-rw-r--r--testing/pmacct/APKBUILD46
-rw-r--r--testing/pmacct/pmacct.confd7
-rw-r--r--testing/pmacct/pmacct.initd29
3 files changed, 82 insertions, 0 deletions
diff --git a/testing/pmacct/APKBUILD b/testing/pmacct/APKBUILD
new file mode 100644
index 0000000000..d5b6b65eba
--- /dev/null
+++ b/testing/pmacct/APKBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Leonardo Arena <rnalrd@gmail.com>
+pkgname=pmacct
+pkgver=0.12.0
+pkgrel=0
+pkgdesc="Measure, account, classify, aggregate and export IPv4 and IPv6 traffic"
+url="http://www.pmacct.net/"
+license="GPL"
+depends=
+makedepends="libpcap-dev"
+install=
+subpackages=""
+source="http://www.pmacct.net/$pkgname-$pkgver.tar.gz
+ pmacct.initd
+ pmacct.confd"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ # apply patches here
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --enable-pgsql \
+ --enable-64bit \
+ --enable-threads \
+ --enable-ulog
+ make || return 1
+}
+
+package() {
+ cd "$_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
+}
+
+md5sums="564c3db9fdeaeb44e3bb3d958937c18c pmacct-0.12.0.tar.gz
+c2427b6a32a4eb649a075a977f5b2c42 pmacct.initd
+394bf0687572261e90eecd70c33c8ede pmacct.confd"
diff --git a/testing/pmacct/pmacct.confd b/testing/pmacct/pmacct.confd
new file mode 100644
index 0000000000..c6557c8074
--- /dev/null
+++ b/testing/pmacct/pmacct.confd
@@ -0,0 +1,7 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/net-analyzer/pmacct/files/pmacctd-conf.d,v 1.3 2007/03/28 21:17:57 cedk Exp $
+
+# Other options to pass to pmacctd
+#OPTS=""
+
diff --git a/testing/pmacct/pmacct.initd b/testing/pmacct/pmacct.initd
new file mode 100644
index 0000000000..e788d66fed
--- /dev/null
+++ b/testing/pmacct/pmacct.initd
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/net-analyzer/pmacct/files/pmacctd-init.d,v 1.4 2009/06/01 09:48:41 pva Exp $
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e /etc/pmacctd.conf ] ; then
+ eerror "You need an /etc/pmacctd.conf file to run pmacctd"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting pmacctd"
+ start-stop-daemon --start --pidfile /var/run/pmacctd.pid --exec /usr/sbin/pmacctd \
+ -- -D -f /etc/pmacctd.conf -F /var/run/pmacctd.pid ${OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pmacctd"
+ start-stop-daemon --stop --pidfile /var/run/pmacctd.pid --exec /usr/sbin/pmacctd
+ eend $?
+}