Index: Makefile =================================================================== --- Makefile +++ 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 @@ 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 @@ MAKE_ARGS= CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \ LFLAGS="${LDFLAGS}" +SUB_FILES= pkg-message +.include + 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 Index: files/pkg-message.in =================================================================== --- files/pkg-message.in +++ files/pkg-message.in @@ -6,19 +6,13 @@ 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" Index: pkg-deinstall =================================================================== --- pkg-deinstall +++ pkg-deinstall @@ -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 *" Index: pkg-install =================================================================== --- pkg-install +++ pkg-install @@ -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} Index: pkg-plist =================================================================== --- pkg-plist +++ 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