aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authorwxs <wxs@FreeBSD.org>2011-05-15 22:08:00 +0800
committerwxs <wxs@FreeBSD.org>2011-05-15 22:08:00 +0800
commit71ffe7d6db0533521bb28291924156d029c9527c (patch)
treecc3ca3f0de31c12382a95b6c37cc0e48429ab5b0 /net-mgmt
parent481849433b011a6482b6ac2c7507051b89d94b79 (diff)
downloadfreebsd-ports-gnome-71ffe7d6db0533521bb28291924156d029c9527c.tar.gz
freebsd-ports-gnome-71ffe7d6db0533521bb28291924156d029c9527c.tar.zst
freebsd-ports-gnome-71ffe7d6db0533521bb28291924156d029c9527c.zip
Include SQL files/instructions
Add RC script Fix incorrect use of CONFIGURE_ENV Add a second mirror PR: ports/157051 Submitted by: Ryan Steinmetz <rpsfa@rit.edu> (maintainer)
Diffstat (limited to 'net-mgmt')
-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