1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-29 05:38:00 +00:00

1. Add a freshclam rc.d script to start freshclam so the AV database is

updated periodically.  Loosely based on the script in the PR.
2. Reorder some operations in the various Makefile targets.
3. Bump PORTREVISION.

PR:		61966 [1]
Submitted by:	Douglas K. Rand <rand@meridian-enviro.com>
This commit is contained in:
Greg Lewis 2004-02-03 06:46:21 +00:00
parent 095206badd
commit dfcb3af5b8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=99866
3 changed files with 48 additions and 3 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= clamav
PORTVERSION= 0.65
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= clamav
@ -102,24 +102,32 @@ post-build:
@${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-install >${PKGINSTALL}
@${SED} ${SED_SCRIPT} ${FILESDIR}/clamav-clamd.sh \
>${WRKDIR}/clamav-clamd.sh
@${SED} ${SED_SCRIPT} ${FILESDIR}/clamav-freshclam.sh \
>${WRKDIR}/clamav-freshclam.sh
.if defined(WITH_MILTER)
@${SED} ${SED_SCRIPT} ${FILESDIR}/clamav-milter.sh \
>${WRKDIR}/clamav-milter.sh
.endif
pre-install:
@${SETENV} PKG_PREFIX=${PREFIX} \
${SH} ${PKGINSTALL} ${PREFIX} PRE-INSTALL
post-install:
@${INSTALL_DATA} ${BUILD_WRKSRC}/etc/clamav.conf.default \
${PREFIX}/etc/clamav.conf.default
@${INSTALL_SCRIPT} ${WRKDIR}/clamav-clamd.sh \
${RC_DIR}/clamav-clamd${RC_SUFX}
@${INSTALL_SCRIPT} ${WRKDIR}/clamav-freshclam.sh \
${RC_DIR}/clamav-freshclam${RC_SUFX}
@${CHOWN} -R clamav:clamav ${DATADIR}
@[ -f ${PREFIX}/etc/clamav.conf ] || \
${CP} ${PREFIX}/etc/clamav.conf.default ${PREFIX}/etc/clamav.conf
@${SETENV} PKG_PREFIX=${PREFIX} \
${SH} ${PKGINSTALL} ${PREFIX} POST-INSTALL
.if defined(WITH_MILTER)
@${INSTALL_SCRIPT} ${WRKDIR}/clamav-milter.sh \
${RC_DIR}/clamav-milter${RC_SUFX}
.endif
@${SETENV} PKG_PREFIX=${PREFIX} \
${SH} ${PKGINSTALL} ${PREFIX} POST-INSTALL
.include <bsd.port.post.mk>

View File

@ -0,0 +1,36 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: freshclam
# REQUIRE: LOGIN
# BEFORE: mail
# KEYWORD: FreeBSD shutdown
#
# Add the following lines to /etc/rc.conf to enable freshclam:
#
#clamav_freshclam_enable="YES"
#
# See freshclam(8) for flags
#
. %%RC_SUBR%%
name=clamav_freshclam
rcvar=`set_rcvar`
command=%%PREFIX%%/bin/freshclam
required_dirs=%%DATADIR%%
# set defaults
clamav_freshclam_enable=${clamav_freshclam_enable:-"NO"}
clamav_freshclam_flags=${clamav_freshclam_flags:-"--checks=1 --datadir=%%DATADIR%% --daemon-notify=%%PREFIX%%/etc/clamav.conf --log=/var/log/clamav/freshclam.log"}
load_rc_config $name
# add --daemon to any given arguments
clamav_freshclam_flags="${clamav_freshclam_flags} --daemon"
run_rc_command "$1"

View File

@ -15,6 +15,7 @@ lib/libclamav.a
etc/clamav.conf.default
@exec [ -f %B/clamav.conf ] || cp %B/%f %B/clamav.conf
etc/rc.d/clamav-clamd%%RC_SUFX%%
etc/rc.d/clamav-freshclam%%RC_SUFX%%
@owner clamav
@group clamav
%%DATADIR%%/daily.cvd