summaryrefslogtreecommitdiffstats
path: root/security/portsentry
diff options
context:
space:
mode:
authorvs <vs@FreeBSD.org>2005-04-18 13:16:47 +0000
committervs <vs@FreeBSD.org>2005-04-18 13:16:47 +0000
commitc863f24af3ac45cc5a0b2ad6f66c28bd3c0933bd (patch)
tree569aa80377f71a810e8d7e972f5209ab3826e3e9 /security/portsentry
parent300112a7083c09e0b643fa4c61b303555fc12dd4 (diff)
downloadFreeBSD-ports-c863f24af3ac45cc5a0b2ad6f66c28bd3c0933bd.zip
FreeBSD-ports-c863f24af3ac45cc5a0b2ad6f66c28bd3c0933bd.tar.gz
- Add (non-rcNG) startup-script (patches welcome)
- Cleanup port (me) PR: ports/72759 Submitted by: Alex de Kruijff
Diffstat (limited to 'security/portsentry')
-rw-r--r--security/portsentry/Makefile6
-rw-r--r--security/portsentry/files/patch-aa17
-rw-r--r--security/portsentry/files/patch-ab17
-rw-r--r--security/portsentry/files/patch-ac18
-rw-r--r--security/portsentry/files/portsentry.sh.in17
-rw-r--r--security/portsentry/pkg-plist9
6 files changed, 27 insertions, 57 deletions
diff --git a/security/portsentry/Makefile b/security/portsentry/Makefile
index 86f0cfc..ce28c6d 100644
--- a/security/portsentry/Makefile
+++ b/security/portsentry/Makefile
@@ -14,17 +14,21 @@ MASTER_SITE_SUBDIR= UNIX/IDS
MAINTAINER= ports@FreeBSD.org
COMMENT= Port scan detection and active defense
+SUB_FILES= portsentry.sh
ALL_TARGET= freebsd
USE_REINPLACE= yes
+CFLAGS+= -DPREFIX=\"${PREFIX}\"
+MAKE_ARGS= CC="${CC}" CFLAGS="${CFLAGS}"
post-patch:
- @${REINPLACE_CMD} -e 's,__PREFIX__,${PREFIX},g' \
+ @${REINPLACE_CMD} -e 's,/usr/local/psionic/portsentry,${PREFIX}/etc,g' \
${WRKSRC}/portsentry.conf ${WRKSRC}/portsentry_config.h
do-install:
${INSTALL_DATA} ${WRKSRC}/portsentry.conf ${PREFIX}/etc/portsentry.conf.default
${INSTALL_DATA} ${WRKSRC}/portsentry.ignore ${PREFIX}/etc/portsentry.ignore.default
${INSTALL_PROGRAM} ${WRKSRC}/portsentry ${PREFIX}/bin
+ ${INSTALL_SCRIPT} ${WRKDIR}/portsentry.sh ${PREFIX}/etc/rc.d/
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README.install ${WRKSRC}/README.methods ${WRKSRC}/README.stealth \
diff --git a/security/portsentry/files/patch-aa b/security/portsentry/files/patch-aa
deleted file mode 100644
index 8497756..0000000
--- a/security/portsentry/files/patch-aa
+++ /dev/null
@@ -1,17 +0,0 @@
---- Makefile.orig Wed Jul 11 16:57:27 2001
-+++ Makefile Wed Sep 12 22:25:13 2001
-@@ -20,13 +20,12 @@
- #
- #
- # Generic compiler (usually linked to gcc on most platforms)
--CC = cc
-
- # GNU..
- #CC = gcc
-
- # Normal systems flags
--CFLAGS = -O -Wall
-+CFLAGS += -DPREFIX=\"${PREFIX}\"
-
- # Debug mode for portsentry
- #CFLAGS = -Wall -g -DNODAEMON -DDEBUG
diff --git a/security/portsentry/files/patch-ab b/security/portsentry/files/patch-ab
deleted file mode 100644
index 93df81b..0000000
--- a/security/portsentry/files/patch-ab
+++ /dev/null
@@ -1,17 +0,0 @@
---- portsentry.conf.orig Sun May 16 21:50:55 1999
-+++ portsentry.conf Sun May 16 21:51:27 1999
-@@ -80,11 +80,11 @@
- ######################
- #
- # Hosts to ignore
--IGNORE_FILE="/usr/local/psionic/portsentry/portsentry.ignore"
-+IGNORE_FILE="__PREFIX__/etc/portsentry.ignore"
- # Hosts that have been denied (running history)
--HISTORY_FILE="/usr/local/psionic/portsentry/portsentry.history"
-+HISTORY_FILE="__PREFIX__/etc/portsentry.history"
- # Hosts that have been denied this session only (temporary until next restart)
--BLOCKED_FILE="/usr/local/psionic/portsentry/portsentry.blocked"
-+BLOCKED_FILE="__PREFIX__/etc/portsentry.blocked"
-
- ###################
- # Response Options#
diff --git a/security/portsentry/files/patch-ac b/security/portsentry/files/patch-ac
deleted file mode 100644
index c0d1f04..0000000
--- a/security/portsentry/files/patch-ac
+++ /dev/null
@@ -1,18 +0,0 @@
---- portsentry_config.h.orig Sun May 16 21:52:00 1999
-+++ portsentry_config.h Sun May 16 21:52:54 1999
-@@ -29,9 +29,14 @@
- /************************************************************************/
-
-
-+/* Installation prefix */
-+#ifndef PREFIX
-+#define PREFIX "/usr/local"
-+#endif
-+
- /* These are probably ok. Be sure you change the Makefile if you */
- /* change the path */
--#define CONFIG_FILE "/usr/local/psionic/portsentry/portsentry.conf"
-+#define CONFIG_FILE PREFIX"/etc/portsentry.conf"
-
- /* The location of Wietse Venema's TCP Wrapper hosts.deny file */
- #define WRAPPER_HOSTS_DENY "/etc/hosts.deny"
diff --git a/security/portsentry/files/portsentry.sh.in b/security/portsentry/files/portsentry.sh.in
new file mode 100644
index 0000000..03d06b3
--- /dev/null
+++ b/security/portsentry/files/portsentry.sh.in
@@ -0,0 +1,17 @@
+#/bin/sh
+PORTSENTRY="%%PREFIX%%/bin/portsentry"
+
+case "$1" in
+ start)
+ echo -n ' portsentry ('
+ ${PORTSENTRY} -tcp > /dev/null && echo -n 'tcp'
+ ${PORTSENTRY} -udp > /dev/null && echo -n ' udp'
+ echo -n ')'
+ ;;
+ stop)
+ killall `basename ${PORTSENTRY}`
+ ;;
+ *)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ ;;
+esac
diff --git a/security/portsentry/pkg-plist b/security/portsentry/pkg-plist
index 85776fa..22c66bd 100644
--- a/security/portsentry/pkg-plist
+++ b/security/portsentry/pkg-plist
@@ -1,11 +1,12 @@
bin/portsentry
+etc/rc.d/portsentry.sh
@unexec if cmp -s %D/etc/portsentry.conf %D/etc/portsentry.conf.default; then rm -f %D/etc/portsentry.conf; fi
etc/portsentry.conf.default
@exec if [ ! -f %D/etc/portsentry.conf ] ; then cp -p %B/portsentry.conf %D/etc/portsentry.conf ; fi
@unexec if cmp -s %D/etc/portsentry.ignore %D/etc/portsentry.ignore.default; then rm -f %D/etc/portsentry.ignore; fi
etc/portsentry.ignore.default
@exec if [ ! -f %D/etc/portsentry.ignore ] ; then cp -p %B/portsentry.ignore %D/etc/portsentry.ignore ; fi
-share/doc/portsentry/README.install
-share/doc/portsentry/README.methods
-share/doc/portsentry/README.stealth
-@dirrm share/doc/portsentry
+%%PORTDOCS%%%%DOCSDIR%%/README.install
+%%PORTDOCS%%%%DOCSDIR%%/README.methods
+%%PORTDOCS%%%%DOCSDIR%%/README.stealth
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
OpenPOWER on IntegriCloud