aboutsummaryrefslogtreecommitdiff
path: root/security/ipguard
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2008-10-16 21:35:41 +0000
committerMartin Wilke <miwi@FreeBSD.org>2008-10-16 21:35:41 +0000
commit52ca764a5d8eaf37b31334423b0f2955975a8492 (patch)
treed99e5f8a75f6ddbacf2bf6c266a8d309e81b3e24 /security/ipguard
parent92f70e98d69c7d74eb044d67579f53b1e978205f (diff)
downloadports-52ca764a5d8eaf37b31334423b0f2955975a8492.tar.gz
ports-52ca764a5d8eaf37b31334423b0f2955975a8492.zip
Notes
Diffstat (limited to 'security/ipguard')
-rw-r--r--security/ipguard/Makefile42
-rw-r--r--security/ipguard/distinfo6
-rw-r--r--security/ipguard/files/ipguard.in30
-rw-r--r--security/ipguard/files/pkg-message.in8
-rw-r--r--security/ipguard/pkg-descr10
-rw-r--r--security/ipguard/pkg-plist9
6 files changed, 61 insertions, 44 deletions
diff --git a/security/ipguard/Makefile b/security/ipguard/Makefile
index faaf5b876617..6b12de937827 100644
--- a/security/ipguard/Makefile
+++ b/security/ipguard/Makefile
@@ -1,5 +1,5 @@
-# New ports collection makefile for: ipguard
-# Date created: 2 Sep 2005
+# Ports collection makefile for: ipguard
+# Date created: 6 Oct 2008
# Whom: SeaD
#
# $FreeBSD$
@@ -7,37 +7,25 @@
PORTNAME= ipguard
PORTVERSION= 1.00
+PORTREVISION= 1
CATEGORIES= security net
-MASTER_SITES= http://ipguard.deep.perm.ru/files/
+MASTER_SITES= http://ipguard.deep.perm.ru/files/ http://deep.perm.ru/files/ipguard/
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= sead@deep.perm.ru
COMMENT= Tool designed to protect LAN IP adress space by ARP spoofing
-BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet
+BUILD_DEPENDS= ${LOCALBASE}/lib/libnet11/libnet.a:${PORTSDIR}/net/libnet
-MAN8= ipguard.8
-
-ETHERS?= /etc/ethers
-
-MAKE_ARGS+= ETHERS=${ETHERS}
-
-SUB_FILES= pkg-message
-SUB_LIST= ETHERS=${ETHERS}
-
-LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet11-config
-
-post-patch:
- @${REINPLACE_CMD} -Ee \
- 's|libnet-config|${LIBNET_CONFIG}|; \
- s|^(INCLUDES=).*|\1`${LIBNET_CONFIG} --cflags`|' \
- ${WRKSRC}/${MAKEFILE}
-
-do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/ipguard ${PREFIX}/sbin
- ${INSTALL_MAN} ${WRKSRC}/doc/ipguard.8 ${MANPREFIX}/man/man8
- ${INSTALL_SCRIPT} ${WRKSRC}/doc/ipguard.sh.sample ${PREFIX}/etc/rc.d
+USE_RC_SUBR= ${PORTNAME}
+MAN8= ${PORTNAME}.8
+DOCS= COPYRIGHT NEWS README README.tcpdump README.log ethers.sample rfc826.txt
post-install:
- @${CAT} ${PKGMESSAGE}
+.ifndef(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+.for doc in ${DOCS}
+ @${INSTALL_DATA} ${WRKSRC}/doc/${doc} ${DOCSDIR}
+.endfor
+.endif
.include <bsd.port.mk>
diff --git a/security/ipguard/distinfo b/security/ipguard/distinfo
index 7f026f37eb1f..d8e6df8dca67 100644
--- a/security/ipguard/distinfo
+++ b/security/ipguard/distinfo
@@ -1,3 +1,3 @@
-MD5 (ipguard-1.00.tar.gz) = 3b8e99994a283c549e2e7f452ef38fd7
-SHA256 (ipguard-1.00.tar.gz) = fb9d7f34a9c83976a1186f6fd33b04e31462beee7550c95001132aef3d08322e
-SIZE (ipguard-1.00.tar.gz) = 25095
+MD5 (ipguard-1.00.tar.gz) = e01642d590a3e34991100e179732a686
+SHA256 (ipguard-1.00.tar.gz) = 39ba935b664a4ac222f49cfc1e82084059fb29063ce7f41d58be80eed0d35b3f
+SIZE (ipguard-1.00.tar.gz) = 25484
diff --git a/security/ipguard/files/ipguard.in b/security/ipguard/files/ipguard.in
new file mode 100644
index 000000000000..6805007fe6a5
--- /dev/null
+++ b/security/ipguard/files/ipguard.in
@@ -0,0 +1,30 @@
+#! /bin/sh
+
+# PROVIDE: ipguard
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+# Add the following lines to /etc/rc.conf to enable ipguard:
+#
+# ipguard_enable="YES"
+# ipguard_interface="iface"
+# ipguard_flags="-u 300 -xz"
+
+. %%RC_SUBR%%
+
+name=ipguard
+rcvar=`set_rcvar`
+start_precmd=ipguard_precmd
+command=%%PREFIX%%/sbin/${name}
+
+ipguard_enable=${ipguard_enable:-"NO"}
+ipguard_interface=${ipguard_interface:-"fxp0"}
+ipguard_flags=${ipguard_flags:-"-u 300 -xz"}
+
+ipguard_precmd() {
+ command_args="$command_args ${ipguard_interface}"
+ pidfile="/var/run/${name}_${ipguard_interface}.pid"
+}
+
+load_rc_config ${name}
+run_rc_command "$1"
diff --git a/security/ipguard/files/pkg-message.in b/security/ipguard/files/pkg-message.in
deleted file mode 100644
index 69293c7c3be6..000000000000
--- a/security/ipguard/files/pkg-message.in
+++ /dev/null
@@ -1,8 +0,0 @@
-
-===> INSTALL NOTES:
- Now create %%ETHERS%% file
- (see ethers(5))
- and then start ipguard:
- (cd %%PREFIX%%/etc/rc.d
- mv ipguard.sh.sample ipguard.sh
- %%PREFIX%%/etc/rc.d/ipguard.sh start)
diff --git a/security/ipguard/pkg-descr b/security/ipguard/pkg-descr
index 45d64b107b50..8f11709b4971 100644
--- a/security/ipguard/pkg-descr
+++ b/security/ipguard/pkg-descr
@@ -1,8 +1,8 @@
-ipguard listens network for ARP packets. All permitted MAC/IP pairs
-listed in 'ethers' file. If it recieves one with MAC/IP pair, which is
+ipguard listens network for ARP packets. All permitted MAC-IP pairs
+listed in 'ethers' file. If it recieves one with MAC-IP pair, which is
not listed in 'ethers' file, it will send ARP reply with configured
-fake address. This will prevent not permitted host to work properly
-in this ethernet segment. Especially Windows(TM) hosts.
+fake address. This will prevent not permitted host to work properly in
+local ethernet segment.
-Author SeaD <sead@mail.ru>
+Author SeaD <sead@deep.perm.ru>
WWW: http://ipguard.deep.perm.ru/
diff --git a/security/ipguard/pkg-plist b/security/ipguard/pkg-plist
index af539868c3b0..8b269f91f71f 100644
--- a/security/ipguard/pkg-plist
+++ b/security/ipguard/pkg-plist
@@ -1,2 +1,9 @@
sbin/ipguard
-etc/rc.d/ipguard.sh.sample
+%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT
+%%PORTDOCS%%%%DOCSDIR%%/NEWS
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/README.tcpdump
+%%PORTDOCS%%%%DOCSDIR%%/README.log
+%%PORTDOCS%%%%DOCSDIR%%/ethers.sample
+%%PORTDOCS%%%%DOCSDIR%%/rfc826.txt
+%%PORTDOCS%%@dirrm %%DOCSDIR%%