aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/pmacct
diff options
context:
space:
mode:
authorWesley Shields <wxs@FreeBSD.org>2011-05-15 14:08:00 +0000
committerWesley Shields <wxs@FreeBSD.org>2011-05-15 14:08:00 +0000
commit218269f688867270f618f37524963c646d01a0f3 (patch)
treec24673a3e3cdca513f6453245baff8d8e0f45721 /net-mgmt/pmacct
parent86302f927b177dee53dd9f9c6ed53da220c3159b (diff)
downloadports-218269f688867270f618f37524963c646d01a0f3.tar.gz
ports-218269f688867270f618f37524963c646d01a0f3.zip
Notes
Diffstat (limited to 'net-mgmt/pmacct')
-rw-r--r--net-mgmt/pmacct/Makefile13
-rw-r--r--net-mgmt/pmacct/files/pkg-message.in17
-rw-r--r--net-mgmt/pmacct/files/pmacctd.in36
-rw-r--r--net-mgmt/pmacct/pkg-plist39
4 files changed, 102 insertions, 3 deletions
diff --git a/net-mgmt/pmacct/Makefile b/net-mgmt/pmacct/Makefile
index 91f03ab6c137..ed6d7aa2870d 100644
--- a/net-mgmt/pmacct/Makefile
+++ b/net-mgmt/pmacct/Makefile
@@ -7,15 +7,19 @@
PORTNAME= pmacct
DISTVERSION= 0.12.5
+PORTREVISION= 1
CATEGORIES= net-mgmt
-MASTER_SITES= http://www.pmacct.net/
+MASTER_SITES= http://www.pmacct.net/ \
+ http://people.rit.edu/rpsfa/
MAINTAINER= rpsfa@rit.edu
COMMENT= Accounting and aggregation tool for IPv4 and IPv6 traffic
+USE_RC_SUBR= pmacctd
+SUB_FILES= pkg-message
GNU_CONFIGURE= yes
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
- LDFLAGS="-L${LOCALBASE}/lib"
+CPPFLAGS= "-I${LOCALBASE}/include"
+LDFLAGS= "-L${LOCALBASE}/lib"
OPTIONS= MYSQL "Enable MySQL support." Off \
PGSQL "Enable PostgreSQL support." Off \
@@ -93,5 +97,8 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
.endif
+ @${MKDIR} ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/sql/* ${DATADIR}
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/net-mgmt/pmacct/files/pkg-message.in b/net-mgmt/pmacct/files/pkg-message.in
new file mode 100644
index 000000000000..c0b30e7a1a95
--- /dev/null
+++ b/net-mgmt/pmacct/files/pkg-message.in
@@ -0,0 +1,17 @@
+=========================================================================
+Please note that this port requires configuration before it will function
+
+Add these to /etc/rc.conf:
+pmacctd_enable="YES"
+pmacctd_flags="-DF %%PREFIX%%/etc/pmacctd.conf -i <interface>"
+
+Configuration examples are located in %%EXAMPLESDIR%%. You must copy
+one of these to %%PREFIX%%/etc/pmacctd.conf and make any required edits
+for your environment.
+
+Database-related files/information can be found in %%DATADIR%%.
+
+Additional documentation is available at:
+WWW: http://wiki.pmacct.net/
+=========================================================================
+
diff --git a/net-mgmt/pmacct/files/pmacctd.in b/net-mgmt/pmacct/files/pmacctd.in
new file mode 100644
index 000000000000..fddb1b0428d6
--- /dev/null
+++ b/net-mgmt/pmacct/files/pmacctd.in
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: pmacctd
+# REQUIRE: NETWORKING
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable pmacctd:
+#
+# pmacctd_enable="YES"
+#
+# You can define flags for pmacctd running. See pmacctd(8) for details.
+#
+# Example:
+# pmacctd_flags="-Df %%PREFIX%%/etc/pmacctd.conf -i em0"
+#
+# Default flags: -Df %%PREFIX%%/etc/pmacctd.conf
+#
+
+. /etc/rc.subr
+
+name=pmacctd
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/$name
+
+# set defaults
+
+pmacctd_enable=${pmacctd_enable:-"NO"}
+pmacctd_flags=${pmacctd_flags:-"-Df %%PREFIX%%/etc/pmacctd.conf"}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/net-mgmt/pmacct/pkg-plist b/net-mgmt/pmacct/pkg-plist
index d24e6d896785..fe7ddd0475d5 100644
--- a/net-mgmt/pmacct/pkg-plist
+++ b/net-mgmt/pmacct/pkg-plist
@@ -5,6 +5,45 @@ sbin/nfacctd
sbin/pmacctd
sbin/sfacctd
sbin/uacctd
+%%DATADIR%%/README.64bit
+%%DATADIR%%/README.IPv6
+%%DATADIR%%/README.agent_id2
+%%DATADIR%%/README.cos
+%%DATADIR%%/README.iface
+%%DATADIR%%/README.is_symmetric
+%%DATADIR%%/README.mask
+%%DATADIR%%/README.mysql
+%%DATADIR%%/README.pgsql
+%%DATADIR%%/README.sqlite3
+%%DATADIR%%/pmacct-create-db.pgsql
+%%DATADIR%%/pmacct-create-db_bgp_v1.mysql
+%%DATADIR%%/pmacct-create-db_v1.mysql
+%%DATADIR%%/pmacct-create-db_v2.mysql
+%%DATADIR%%/pmacct-create-db_v3.mysql
+%%DATADIR%%/pmacct-create-db_v4.mysql
+%%DATADIR%%/pmacct-create-db_v5.mysql
+%%DATADIR%%/pmacct-create-db_v6.mysql
+%%DATADIR%%/pmacct-create-db_v7.mysql
+%%DATADIR%%/pmacct-create-db_v8.mysql
+%%DATADIR%%/pmacct-create-table_bgp_v1.pgsql
+%%DATADIR%%/pmacct-create-table_bgp_v1.sqlite3
+%%DATADIR%%/pmacct-create-table_v1.pgsql
+%%DATADIR%%/pmacct-create-table_v1.sqlite3
+%%DATADIR%%/pmacct-create-table_v2.pgsql
+%%DATADIR%%/pmacct-create-table_v2.sqlite3
+%%DATADIR%%/pmacct-create-table_v3.pgsql
+%%DATADIR%%/pmacct-create-table_v3.sqlite3
+%%DATADIR%%/pmacct-create-table_v4.pgsql
+%%DATADIR%%/pmacct-create-table_v4.sqlite3
+%%DATADIR%%/pmacct-create-table_v5.pgsql
+%%DATADIR%%/pmacct-create-table_v5.sqlite3
+%%DATADIR%%/pmacct-create-table_v6.pgsql
+%%DATADIR%%/pmacct-create-table_v6.sqlite3
+%%DATADIR%%/pmacct-create-table_v7.pgsql
+%%DATADIR%%/pmacct-create-table_v7.sqlite3
+%%DATADIR%%/pmacct-create-table_v8.sqlite3
+%%DATADIR%%/pmacct-grant-db.mysql
+@dirrmtry %%DATADIR%%
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
%%PORTDOCS%%%%DOCSDIR%%/EXAMPLES
%%PORTDOCS%%%%DOCSDIR%%/FAQS