1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00

Update to 2.0

PR:		90017
Submitted by:	Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> (maintainer)
This commit is contained in:
Emanuel Haupt 2005-12-24 14:02:14 +00:00
parent 08aa3f932b
commit 963b5ef8eb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=151965
6 changed files with 105 additions and 95 deletions

View File

@ -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
USE_BZIP2= yes
GNU_CONFIGURE= yes
USE_RC_SUBR= yes
.ifdef WITH_PF
PF_INCLUDE_DIR?= /usr/include/net
MAKE_ARGS+= PF_INCLUDE_DIR=${PF_INCLUDE_DIR}
.endif
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
.if ${OSVERSION} >= 600000
MAKE_ARGS+= -DIPFW2
IPFW2= yes
.ifdef WITHOUT_RULES
CONFIGURE_ARGS+= --disable-rules
.endif
pre-everything::
@${ECHO_MSG} "-------------------------------------------------------------------"
.if !defined(WITHOUT_IPFW)
@${ECHO_MSG} "o You can remove IPv4 Firewall support by defining WITHOUT_IPFW"
.ifdef WITHOUT_LIMITS
CONFIGURE_ARGS+= --disable-limits
.endif
.if !defined(WITHOUT_IP6FW) && ${OSVERSION} >= 420001
@${ECHO_MSG} "o You can remove IPv6 Firewall support by defining WITHOUT_IP6FW"
.ifdef WITHOUT_SUBLIMITS
CONFIGURE_ARGS+= --disable-sublimits
.endif
.if !defined(WITHOUT_IPFIL)
@${ECHO_MSG} "o You can remove IP Filter support by defining WITHOUT_IPFIL"
.ifdef WITHOUT_THRESHOLDS
CONFIGURE_ARGS+= --disable-thresholds
.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 WITHOUT_CTL_CREDS
CONFIGURE_ARGS+= --disable-ctl-creds
.endif
.if !defined(IPFW2) && !defined(WITHOUT_IPFW) && ${OSVERSION} >= 460100 && ${OSVERSION} < 500038
@${ECHO_MSG} "o You can add IPFW2 support by defining IPFW2"
.ifdef WITH_MEMFUNC_DEBUG
CONFIGURE_ARGS+= --enable-memfunc-debug
.endif
.if ${OSVERSION} >= 500000 && !defined(WITH_PF)
@${ECHO_MSG} "o You can add OpenBSD Packet Filter support by defining WITH_PF"
.ifdef WITH_DEBUG_INFO
STRIP= # empty
CFLAGS+= -g
.endif
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
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>

View File

@ -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

32
sysutils/ipa/files/ipa.sh Normal file
View File

@ -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"

View File

@ -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

View File

@ -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/

View File

@ -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