aboutsummaryrefslogtreecommitdiff
path: root/sysutils/ipa
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2005-12-24 14:02:14 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2005-12-24 14:02:14 +0000
commit963b5ef8ebd90b59df18bd08caed89b193d15802 (patch)
tree798fe58d5971c2bb7eca86735a5954deaa90d7fc /sysutils/ipa
parent08aa3f932bbb77f4fa11bd8265839c90d7448508 (diff)
downloadports-963b5ef8ebd90b59df18bd08caed89b193d15802.tar.gz
ports-963b5ef8ebd90b59df18bd08caed89b193d15802.zip
Notes
Diffstat (limited to 'sysutils/ipa')
-rw-r--r--sysutils/ipa/Makefile96
-rw-r--r--sysutils/ipa/distinfo5
-rw-r--r--sysutils/ipa/files/ipa.sh32
-rw-r--r--sysutils/ipa/files/patch-aa37
-rw-r--r--sysutils/ipa/pkg-descr16
-rw-r--r--sysutils/ipa/pkg-plist14
6 files changed, 105 insertions, 95 deletions
diff --git a/sysutils/ipa/Makefile b/sysutils/ipa/Makefile
index d378c3b0fc0a..e2616369a7eb 100644
--- a/sysutils/ipa/Makefile
+++ b/sysutils/ipa/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= ipa
-PORTVERSION= 1.3.6
+PORTVERSION= 2.0
CATEGORIES= sysutils
MASTER_SITES= http://ipa-system.sourceforge.net/ \
http://www.mirrors.wiretapped.net/security/network-monitoring/ipa/ \
@@ -14,57 +14,77 @@ MASTER_SITES= http://ipa-system.sourceforge.net/ \
http://ipa.it-ss.be/
MAINTAINER= simon@comsys.ntu-kpi.kiev.ua
-COMMENT= IP accounting software
+COMMENT= Pluggable accounting system
-NO_PACKAGE= "Needs to be built uniquely for each host"
-ALL_TARGET=
-.ifdef(NOPORTDOCS)
-MAKE_ENV= NOPORTDOCS="${NOPORTDOCS}"
-.endif
-
-.ifdef WITH_PF
-PF_INCLUDE_DIR?= /usr/include/net
-MAKE_ARGS+= PF_INCLUDE_DIR=${PF_INCLUDE_DIR}
-.endif
+USE_BZIP2= yes
+GNU_CONFIGURE= yes
+USE_RC_SUBR= yes
-MAN5= ipa.5 ipa.conf.5
-MAN8= ipa.8 ipastat.8
-MANLANG= "" ru_RU.KOI8-R
+OPTIONS= AUTORULES "Enable dynamic rules support" on \
+ RULES "Enable static rules support" on \
+ LIMITS "Enable limits support" on \
+ SUBLIMITS "Enable sublimits support" on \
+ THRESHOLDS "Enable thresholds support" on \
+ CTL_CREDS "Enable ipactl's messages credentials" on \
+ MEMFUNC_DEBUG "Enable ipa_memfunc debugging" off \
+ DEBUG_INFO "Produce debugging information" off \
+ MAN_KOI8_R "Install Russian manual pages" off
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 600000
-MAKE_ARGS+= -DWITHOUT_IPFIL
-WITHOUT_IPFIL= yes
+.ifdef WITHOUT_AUTORULES
+CONFIGURE_ARGS+= --disable-autorules
+.endif
+
+.ifdef WITHOUT_RULES
+CONFIGURE_ARGS+= --disable-rules
+.endif
+
+.ifdef WITHOUT_LIMITS
+CONFIGURE_ARGS+= --disable-limits
.endif
-.if ${OSVERSION} >= 600000
-MAKE_ARGS+= -DIPFW2
-IPFW2= yes
+.ifdef WITHOUT_SUBLIMITS
+CONFIGURE_ARGS+= --disable-sublimits
.endif
-pre-everything::
- @${ECHO_MSG} "-------------------------------------------------------------------"
-.if !defined(WITHOUT_IPFW)
- @${ECHO_MSG} "o You can remove IPv4 Firewall support by defining WITHOUT_IPFW"
+.ifdef WITHOUT_THRESHOLDS
+CONFIGURE_ARGS+= --disable-thresholds
.endif
-.if !defined(WITHOUT_IP6FW) && ${OSVERSION} >= 420001
- @${ECHO_MSG} "o You can remove IPv6 Firewall support by defining WITHOUT_IP6FW"
+
+.ifdef WITHOUT_CTL_CREDS
+CONFIGURE_ARGS+= --disable-ctl-creds
.endif
-.if !defined(WITHOUT_IPFIL)
- @${ECHO_MSG} "o You can remove IP Filter support by defining WITHOUT_IPFIL"
+
+.ifdef WITH_MEMFUNC_DEBUG
+CONFIGURE_ARGS+= --enable-memfunc-debug
.endif
-.if !defined(WITHOUT_IP6FW) && !defined(WITH_IP6FW) && ${OSVERSION} >= 400000 && ${OSVERSION} < 420001
- @${ECHO_MSG} "o You can add IPv6 Firewall support by defining WITH_IP6FW,"
- @${ECHO_MSG} " this support will be probably broken on your system (see the"
- @${ECHO_MSG} " ${WRKSRC}/INSTALL file for more information)"
+
+.ifdef WITH_DEBUG_INFO
+STRIP= # empty
+CFLAGS+= -g
.endif
-.if !defined(IPFW2) && !defined(WITHOUT_IPFW) && ${OSVERSION} >= 460100 && ${OSVERSION} < 500038
- @${ECHO_MSG} "o You can add IPFW2 support by defining IPFW2"
+
+MAN3= ipa_mod.3
+MAN5= ipa.conf.5 ipastat.conf.5
+MAN8= ipa.8 ipactl.8 ipastat.8
+MANLANG= ""
+.ifdef WITH_MAN_KOI8_R
+MANLANG+= ru.KOI8-R
.endif
-.if ${OSVERSION} >= 500000 && !defined(WITH_PF)
- @${ECHO_MSG} "o You can add OpenBSD Packet Filter support by defining WITH_PF"
+
+RC_SCRIPT_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
+
+post-build:
+ @${SED} ${RC_SCRIPT_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${FILESDIR}/ipa.sh > ${WRKSRC}/ipa.sh
+
+do-install:
+ cd ${WRKSRC}/src && make install
+ cd ${WRKSRC}/man && make install-am
+ ${INSTALL_SCRIPT} ${WRKSRC}/ipa.sh ${PREFIX}/etc/rc.d
+.ifdef WITH_MAN_KOI8_R
+ cd ${WRKSRC}/man/ru.KOI8-R && make install
.endif
- @${ECHO_MSG} "-------------------------------------------------------------------"
.include <bsd.port.post.mk>
diff --git a/sysutils/ipa/distinfo b/sysutils/ipa/distinfo
index f31fabb83be6..2bb7115d77be 100644
--- a/sysutils/ipa/distinfo
+++ b/sysutils/ipa/distinfo
@@ -1,2 +1,3 @@
-MD5 (ipa-1.3.6.tar.gz) = 292479df20497a12b48e8b458004d763
-SIZE (ipa-1.3.6.tar.gz) = 137156
+MD5 (ipa-2.0.tar.bz2) = 3031b5c837ad059c7401e5d18726c9d9
+SHA256 (ipa-2.0.tar.bz2) = 48b97af965b995f33fb9b331e4690ad02691ec458607c59bb7bfee689f2a0046
+SIZE (ipa-2.0.tar.bz2) = 281507
diff --git a/sysutils/ipa/files/ipa.sh b/sysutils/ipa/files/ipa.sh
new file mode 100644
index 000000000000..df02f5a46b5a
--- /dev/null
+++ b/sysutils/ipa/files/ipa.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# If some IPA module requires some services, then they should
+# be specified after the REQUIRE, by default REQUIRE is empty,
+# since ipa itself does not require anything for running.
+
+# PROVIDE: ipa
+# REQUIRE:
+# BEFORE: LOGIN
+
+# Following line can enable ipa (see rc.subr(8) for information
+# where to write it):
+#
+# ipa_enable (boolean) Set to "YES" to enable ipa
+# (default is "NO")
+
+. %%RC_SUBR%%
+
+name=ipa
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/bin/ipa"
+
+load_rc_config $name
+
+ipa_enable=${ipa_enable:-"NO"}
+
+extra_commands="reload"
+run_rc_command "$1"
diff --git a/sysutils/ipa/files/patch-aa b/sysutils/ipa/files/patch-aa
deleted file mode 100644
index ae7857e24ad1..000000000000
--- a/sysutils/ipa/files/patch-aa
+++ /dev/null
@@ -1,37 +0,0 @@
---- Makefile.orig Fri Jun 27 11:20:49 2003
-+++ Makefile Fri Jun 27 11:23:09 2003
-@@ -38,7 +38,7 @@
- # -Ox - optimize;
- # -g - produce debugging information.
- #
--CFLAGS= -Wall -O1 -g
-+#CFLAGS= -Wall -O1 -g
-
- #
- # PREFIX - prefix for all below listed paths
-@@ -81,10 +81,10 @@
- #
- # INSTALL_* variables
- #
--INSTALL_MAN= ${INSTALL} -c -g wheel -o root -m 0444
--INSTALL_DATA= ${INSTALL} -c -g wheel -o root -m 0444
--INSTALL_PROGRAM= ${INSTALL} -c -g wheel -o root -m 0555
--INSTALL_SCRIPT= ${INSTALL} -c -g wheel -o root -m 0500
-+INSTALL_MAN= ${BSD_INSTALL_MAN}
-+INSTALL_DATA= ${BSD_INSTALL_DATA}
-+INSTALL_PROGRAM= ${BSD_INSTALL_PROGRAM}
-+INSTALL_SCRIPT= ${BSD_INSTALL_SCRIPT}
- INSTALL_MAN_DIR= ${INSTALL} -d -m 0555 -g wheel -o root
- INSTALL_DATA_DIR= ${INSTALL} -d -m 0555 -g wheel -o root
-
-@@ -225,8 +225,10 @@
- .endif
- ${INSTALL_MAN} man/ru_RU.KOI8-R/ipa.5 man/ru_RU.KOI8-R/ipa.conf.5 ${DST_MAN_DIR}/ru_RU.KOI8-R/man5
- ${INSTALL_MAN} man/ru_RU.KOI8-R/ipa.8 man/ru_RU.KOI8-R/ipastat.8 ${DST_MAN_DIR}/ru_RU.KOI8-R/man8
-+.if !defined(NOPORTDOCS)
- ${INSTALL_DATA_DIR} ${DST_EXAMPLE_DIR}
- ${INSTALL_DATA} examples/* ${DST_EXAMPLE_DIR}
-+.endif
- .if exists(${DST_RC_DIR})
- ${INSTALL_SCRIPT} etc/ipa.sh.sample ${DST_RC_DIR}
- .else
diff --git a/sysutils/ipa/pkg-descr b/sysutils/ipa/pkg-descr
index 2511b8b3279e..9a785b4a262b 100644
--- a/sysutils/ipa/pkg-descr
+++ b/sysutils/ipa/pkg-descr
@@ -1,12 +1,14 @@
-ipa(8) allows to make IP accounting (network accounting) based on
-FreeBSD IPv4/v6 Firewall (including IPFW2), OpenBSD Packet Filter and
-IP Filter accounting rules on FreeBSD, NetBSD and OpenBSD.
+IPA -- Pluggable Accounting System
-It supports limits for accounting rules and limits events as "limit is
-reached", "reached limit is expired", etc. It understands time intervals
-like "end of day", "end of week", "end of month", etc.
+Main features:
-ipastat(8) is a viewer for IP accounting database made by ipa(8).
+- flexible general purpose accounting system;
+- supports static and dynamic rules;
+- supports limits, sublimits and thresholds;
+- works with external accounting modules;
+- works with external database modules;
+- works with external statistics modules;
+- accounting per specified period of a week.
WWW: http://ipa-system.sourceforge.net/
diff --git a/sysutils/ipa/pkg-plist b/sysutils/ipa/pkg-plist
index 64cfaa70a16f..15838ba08cb4 100644
--- a/sysutils/ipa/pkg-plist
+++ b/sysutils/ipa/pkg-plist
@@ -1,13 +1,5 @@
bin/ipa
+bin/ipactl
bin/ipastat
-etc/ipa.conf.default
-@unexec if [ -f %D/etc/rc.d/ipa.sh ]; then cmp -s %D/etc/rc.d/ipa.sh.sample %D/etc/rc.d/ipa.sh && rm -f %D/etc/rc.d/ipa.sh || echo "If you are permanently removing this port, you should do a ``rm ${PKG_PREFIX}/etc/rc.d/ipa.sh`` to remove startup files left." | fmt ; fi
-etc/rc.d/ipa.sh.sample
-%%PORTDOCS%%share/examples/ipa/README
-%%PORTDOCS%%share/examples/ipa/example-1
-%%PORTDOCS%%share/examples/ipa/example-2
-%%PORTDOCS%%@dirrm share/examples/ipa
-@unexec if [ ! -L %D/man/ru_RU.KOI8-R ]; then rmdir %D/man/ru_RU.KOI8-R/man8 %D/man/ru_RU.KOI8-R/man5 %D/man/ru_RU.KOI8-R 2>/dev/null || true ; fi
-@unexec if [ ! -L %D/man/ru_SU.KOI8-R ]; then rmdir %D/man/ru_SU.KOI8-R/man8 %D/man/ru_SU.KOI8-R/man5 %D/man/ru_SU.KOI8-R 2>/dev/null || true ; fi
-@unexec if [ -L %D/man/ru_RU.KOI8-R -a ! -d %D/man/ru_SU.KOI8-R ]; then rm %D/man/ru_RU.KOI8-R 2>/dev/null || true ; fi
-@unexec if [ -L %D/man/ru_SU.KOI8-R -a ! -d %D/man/ru_RU.KOI8-R ]; then rm %D/man/ru_SU.KOI8-R 2>/dev/null || true ; fi
+etc/rc.d/ipa.sh
+include/ipa_mod.h