aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--security/sancp/Makefile19
-rw-r--r--security/sancp/files/pkg-message.in14
-rw-r--r--security/sancp/pkg-deinstall9
-rw-r--r--security/sancp/pkg-install10
-rw-r--r--security/sancp/pkg-plist6
5 files changed, 17 insertions, 41 deletions
diff --git a/security/sancp/Makefile b/security/sancp/Makefile
index 6472bf1b19d1..73f9937dcfbb 100644
--- a/security/sancp/Makefile
+++ b/security/sancp/Makefile
@@ -4,11 +4,11 @@
PORTNAME= sancp
PORTVERSION= 1.6.1
DISTVERSIONSUFFIX= -stable
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= security
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}-stable
-MAINTAINER= pauls@utdallas.edu
+MAINTAINER= bofh@FreeBSD.org
COMMENT= Network connection profiler
LICENSE= QPLv1
@@ -18,8 +18,6 @@ LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
ALL_TARGET= bsd
USE_RC_SUBR= sancp
-LOG_DIR= /var/log/sancp
-PLIST_SUB+= LOG_DIR=${LOG_DIR}
USERS= sancp
GROUPS= sancp
@@ -31,18 +29,23 @@ PORTDOCS= CHANGES INSTALL ISSUES \
MAKE_ARGS= CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
LFLAGS="${LDFLAGS}"
+SUB_FILES= pkg-message
+
+.include <bsd.port.options.mk>
post-patch:
@${REINPLACE_CMD} -e 's|gcc|$${CC}|g ; s|g++|$${CXX}|g' \
${WRKSRC}/Makefile
do-install:
- @${INSTALL_PROGRAM} ${WRKSRC}/sancp \
+ ${INSTALL_PROGRAM} ${WRKSRC}/sancp \
${STAGEDIR}${PREFIX}/bin
- @${INSTALL_DATA} ${WRKSRC}/etc/sancp/sancp.conf \
- ${STAGEDIR}${PREFIX}/etc/sancp.conf.dist
+ ${INSTALL_DATA} ${WRKSRC}/etc/sancp/sancp.conf \
+ ${STAGEDIR}${PREFIX}/etc/sancp.conf.sample
+ ${MKDIR} ${STAGEDIR}/var/log/sancp
+.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/docs/|} ${STAGEDIR}${DOCSDIR}
- ${INSTALL} -m 750 -d ${STAGEDIR}${LOG_DIR}
+.endif
.include <bsd.port.mk>
diff --git a/security/sancp/files/pkg-message.in b/security/sancp/files/pkg-message.in
index 82ecb5562a3e..eea9f74280bf 100644
--- a/security/sancp/files/pkg-message.in
+++ b/security/sancp/files/pkg-message.in
@@ -6,19 +6,13 @@ A startup script was installed in %%PREFIX%%/etc/rc.d/. Enable the script
in /etc/rc.conf using the usual rc.subr syntax. See rc.conf(5) or go to
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-rcng.html
-Configuration files named sancp.conf-dist and sancp.conf
+Configuration files named sancp.conf.sample and sancp.conf
were installed in %%PREFIX%%/etc. See the INSTALL doc, located in
%%PREFIX%%/share/doc/sancp/ for details on configuration
options or type "sancp -h" on the commandline.
-Note that if you are installing sancp for use with sguil, the
-sancp.conf file will not be altered unless it is identical to
-the sancp.conf-dist file. In that case, during the
-sguil-sensor install, the sancp.conf file will be overwritten with
-the one that comes with squil. That file needs no editing. If the
-sancp.conf has been altered (you used sancp for something else) a
-new conf file, named sguil-sancp.conf-sample will be installed in the
-%%PREFIX%%/etc directory. You should use that one for sguil.
+Note that if you are installing sancp for use with sguil, you should use the
+the one that came with sguil in %%PREFIX%%/etc/sguil-sensor directory.
If you're running sguil, you probably want to use at least the following flags:
-sancp_flags="-D -P -R -u sancp -g sancp -d /var/log/sancp"
+sancp_flags="-D -P -R -u sancp -g sancp -d /var/log/sancp -c %%PREFIX%%/etc/sguil-sensor/sancp.conf"
diff --git a/security/sancp/pkg-deinstall b/security/sancp/pkg-deinstall
deleted file mode 100644
index 96f4167cd9e0..000000000000
--- a/security/sancp/pkg-deinstall
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-if [ "$2" != "POST-DEINSTALL" ]; then
- exit 0
-fi
-
-PATH=/bin:/usr/bin
-
-echo "* If you nolonger plan to run sancp delete /var/log/sancp, the user & group created during install *"
diff --git a/security/sancp/pkg-install b/security/sancp/pkg-install
deleted file mode 100644
index 926c97d363d1..000000000000
--- a/security/sancp/pkg-install
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-if [ "$2" != "POST-INSTALL" ]; then
- exit 0
-fi
-
-PATH=/bin:/usr/sbin
-LOG_DIR=/var/log/sancp
-
-chmod 750 ${LOG_DIR}
diff --git a/security/sancp/pkg-plist b/security/sancp/pkg-plist
index 1302e414b234..63b30649d17e 100644
--- a/security/sancp/pkg-plist
+++ b/security/sancp/pkg-plist
@@ -1,5 +1,3 @@
bin/sancp
-@unexec if cmp -s %D/etc/sancp.conf %D/etc/sancp.conf.dist ; then rm -f %D/etc/sancp.conf ; fi
-etc/sancp.conf.dist
-@exec if [ ! -f %D/etc/sancp.conf ] ; then cp -p %D/%F %B/sancp.conf; fi
-@dirrmtry /var/log/sancp
+@sample etc/sancp.conf.sample
+@dir(sancp,sancp,750) /var/log/sancp