diff options
author | Greg Lewis <glewis@FreeBSD.org> | 2004-02-03 06:46:21 +0000 |
---|---|---|
committer | Greg Lewis <glewis@FreeBSD.org> | 2004-02-03 06:46:21 +0000 |
commit | dfcb3af5b8f61761317df79fc7f5cffe4a57db09 (patch) | |
tree | e91db1c2025f4f6e566f789524685e6fc5534519 /security/clamav | |
parent | 095206badd592da68a57c2843412f35de97b76cb (diff) | |
download | ports-dfcb3af5b8f61761317df79fc7f5cffe4a57db09.tar.gz ports-dfcb3af5b8f61761317df79fc7f5cffe4a57db09.zip |
Notes
Diffstat (limited to 'security/clamav')
-rw-r--r-- | security/clamav/Makefile | 14 | ||||
-rw-r--r-- | security/clamav/files/clamav-freshclam.sh | 36 | ||||
-rw-r--r-- | security/clamav/pkg-plist | 1 |
3 files changed, 48 insertions, 3 deletions
diff --git a/security/clamav/Makefile b/security/clamav/Makefile index 82ca6d3228c6..eedd186336c2 100644 --- a/security/clamav/Makefile +++ b/security/clamav/Makefile @@ -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> diff --git a/security/clamav/files/clamav-freshclam.sh b/security/clamav/files/clamav-freshclam.sh new file mode 100644 index 000000000000..ea87bd583c50 --- /dev/null +++ b/security/clamav/files/clamav-freshclam.sh @@ -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" diff --git a/security/clamav/pkg-plist b/security/clamav/pkg-plist index a12af6b1d7fd..552820d185c6 100644 --- a/security/clamav/pkg-plist +++ b/security/clamav/pkg-plist @@ -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 |