security/sancp: Ports cleanup
- Unmute INSTALL_* - Wrap conditional DOCS installation - Remove pkg-install/pkg-deinstall as those have been shifted to @dir framework - Update pkg-plist to make proper use of @sample and @dir - Pass Maintainership [1] Differential Revision: https://reviews.freebsd.org/D1511 Submitted by: pauls@utdallas.edu [1] Approved by: marino(mentor)
This commit is contained in:
parent
d40dcd7a43
commit
43ff525c66
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=376921
@ -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>
|
||||
|
@ -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"
|
||||
|
@ -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 *"
|
@ -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}
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user