From 8dba87a30aa384eb62dc978ad52fa8c9e0b11925 Mon Sep 17 00:00:00 2001 From: Leonardo Arena Date: Mon, 5 Apr 2010 08:38:35 +0000 Subject: testing/pmacct: new aport --- testing/pmacct/APKBUILD | 46 +++++++++++++++++++++++++++++++++++++++++++++ testing/pmacct/pmacct.confd | 7 +++++++ testing/pmacct/pmacct.initd | 29 ++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 testing/pmacct/APKBUILD create mode 100644 testing/pmacct/pmacct.confd create mode 100644 testing/pmacct/pmacct.initd diff --git a/testing/pmacct/APKBUILD b/testing/pmacct/APKBUILD new file mode 100644 index 00000000..d5b6b65e --- /dev/null +++ b/testing/pmacct/APKBUILD @@ -0,0 +1,46 @@ +# Maintainer: Leonardo Arena +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 00000000..c6557c80 --- /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 00000000..e788d66f --- /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 $? +} -- cgit v1.2.3