openbsd-ports/net/pmacct/Makefile
sthen e3b34c582e import net/pmacct, based on a submission from Manuel Pata.
pmacct is a set of passive network monitoring tools to measure, account,
classify, aggregate and export IPv4 and IPv6 traffic, suitable to ISP, IXP,
CDN, IP carrier, data-centre and hot-spot enviroments.

Being able to collect flow data through libpcap, NetFlow and sFlow and
optionally augment this by configuring peering with the included BGP
daemon, granularity is fine enough for essential network management
tasks such as billing, graphing network resource usage, analysing live
or historical traffic trends, steering BGP peerings, real-time alerting,
and certain SLA monitoring.

Aggregation, flexible filtering, sampling and renormalization capabilities
are provided to help cope with the large amounts of data produced by high-
speed networks. Using either memory or database tables (MySQL, PostgreSQL,
SQLite) as backend storage, pmacct can easily feed data into external
tools, including RRDtool, GNUPlot, Net-SNMP, MRTG and Cacti.

The default package provides SQLite support, available flavors are:

        threads       compile with threads, required for BGP integration
                      or running packet classification in parallel
        mysql         compile with support for MySQL
        postgresql    compile with support for PostgreSQL
2009-10-03 18:54:44 +00:00

68 lines
1.6 KiB
Makefile

# $OpenBSD: Makefile,v 1.1.1.1 2009/10/03 18:54:44 sthen Exp $
COMMENT= IP accounting software
DISTNAME= pmacct-0.12.0rc2
CATEGORIES= net
HOMEPAGE= http://www.pmacct.net/
# GPLv2
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c m pcap z
MASTER_SITES= ${HOMEPAGE}
LIB_DEPENDS+= sqlite3.>=8::databases/sqlite3
CONFIGURE_STYLE=gnu
CONFIGURE_ARGS= --enable-64bit \
--enable-ipv6 \
--enable-sqlite3 \
--with-sqlite3-includes="${LOCALBASE}/include"
.ifdef DEBUG
MAKE_ARGS+= DEBUG=1
.endif
FLAVORS= mysql postgresql threads
FLAVOR?=
.if ${FLAVOR:L:Mpostgresql}
LIB_DEPENDS+= pq.>=2::databases/postgresql
CONFIGURE_ARGS+= --enable-pgsql \
--with-pgsql-includes="${LOCALBASE}/include/postgresql/"
.else
CONFIGURE_ARGS+= --disable-pgsql
.endif
.if ${FLAVOR:L:Mmysql}
LIB_DEPENDS+= lib/mysql/mysqlclient.>=10::databases/mysql
CONFIGURE_ARGS+= --enable-mysql
.else
CONFIGURE_ARGS+= --disable-mysql
.endif
.if ${FLAVOR:L:Mthreads}
WANTLIB += pthread
CONFIGURE_ARGS+= --enable-threads
.else
CONFIGURE_ARGS+= --disable-threads
.endif
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/pmacct
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/pmacct/sql
${INSTALL_DATA} ${WRKSRC}/CONFIG-KEYS ${PREFIX}/share/doc/pmacct/
${INSTALL_DATA} ${WRKSRC}/EXAMPLES ${PREFIX}/share/doc/pmacct/
${INSTALL_DATA} ${WRKSRC}/docs/* ${PREFIX}/share/doc/pmacct/
${INSTALL_DATA} ${WRKSRC}/examples/* ${PREFIX}/share/examples/pmacct/
${INSTALL_DATA} ${WRKSRC}/sql/README* ${PREFIX}/share/doc/pmacct/
${INSTALL_DATA} `find ${WRKSRC}/sql -type f \! -name README*` \
${PREFIX}/share/examples/pmacct/sql/
.include <bsd.port.mk>