updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / pmacct / PKGBUILD
blob7dc4d10e96bf61cbd6691b3aeac7f040a6566f2c
1 # Contributor : xav <xav at ethertricks dot net>
3 pkgname=pmacct
4 pkgver=0.14.0rc2
5 pkgrel=1
6 pkgdesc="Accounting and aggregation toolsuite for IPv4 and IPv6 able to collect data through libpcap, Netlink/ULOG, Netflow and sFlow"
7 arch=('i686' 'x86_64')
8 url="http://www.pmacct.net/"
9 license=('GPL2')
10 depends=('libpcap' 'libmysqlclient' 'postgresql-libs' 'sqlite3')
11 source=(http://www.pmacct.net/${pkgname}-${pkgver}.tar.gz 
12         pmacctd.rc.d \
13         nfacctd.rc.d \
14         sfacctd.rc.d \
15         uacctd.rc.d)
16 sha1sums=('54412cd2ed32fd9a177fd013c0db4ec18a0a7131'
17           '084404167416e8e5e5d4736a68e37a0bfb9bfa58'
18           '98483e508a8100425c5ad941a2025bbd034c4ba9'
19           'c2171c1f64b956a56eaa5955d723b0778ba01c79'
20           '089a63e02d07ea61c8e7c265b955ac587969c814')
21 build() {
22   
23   cd ${srcdir}/${pkgname}-${pkgver}
24   ./configure --prefix=/usr --mandir=/usr/share/man --enable-ipv6 --enable-mysql --enable-pgsql --enable-sqlite3 --enable-64bit --enable-threads
25   make || return 1
26   make DESTDIR=${pkgdir} install || return 1
27   
28   mkdir -p ${pkgdir}/etc/pmacct/examples ${pkgdir}/usr/share/pmacct/{mysql,pgsql,sqlite3,sh} ${pkgdir}/usr/share/doc/pmacct 
29   
30   # configuration examples
31   install -Dm644 ${srcdir}/${pkgname}-${pkgver}/examples/pmacctd-imt.conf.example ${pkgdir}/etc/pmacct/pmacctd.conf
32   install -Dm644 ${srcdir}/${pkgname}-${pkgver}/examples/*.example ${pkgdir}/etc/pmacct/examples/
33   
34   # rc.d scripts
35   install -Dm755 ${startdir}/sfacctd.rc.d ${pkgdir}/etc/rc.d/sfacctd
36   install -Dm755 ${startdir}/nfacctd.rc.d ${pkgdir}/etc/rc.d/nfacctd
37   install -Dm755 ${startdir}/nfacctd.rc.d ${pkgdir}/etc/rc.d/uacctd
38   install -Dm755 ${startdir}/pmacctd.rc.d ${pkgdir}/etc/rc.d/pmacctd
39   
40   # sh and sql scripts
41   install -Dm644 ${srcdir}/${pkgname}-${pkgver}/sql/*.mysql ${pkgdir}/usr/share/pmacct/mysql/
42   install -Dm644 ${srcdir}/${pkgname}-${pkgver}/sql/*.pgsql ${pkgdir}/usr/share/pmacct/pgsql/
43   install -Dm644 ${srcdir}/${pkgname}-${pkgver}/sql/*.sqlite3 ${pkgdir}/usr/share/pmacct/sqlite3/
44   install -Dm744 ${srcdir}/${pkgname}-${pkgver}/examples/*.sh ${pkgdir}/usr/share/pmacct/sh/
46   # documentation
47   install -Dm644 ${srcdir}/${pkgname}-${pkgver}/sql/README.* ${pkgdir}/usr/share/doc/pmacct/
48   install -Dm644 ${srcdir}/${pkgname}-${pkgver}/docs/* ${pkgdir}/usr/share/doc/pmacct/
49   cp AUTHORS ChangeLog CONFIG-KEYS COPYING EXAMPLES FAQS KNOWN-BUGS README TODO TOOLS UPGRADE ${pkgdir}/usr/share/doc/pmacct/
50