1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

- Update to 20041101

- Configuration file was renamed to clamd.conf!

PR:		ports/73491
Submitted by:	Rob Evers <rob@debank.tv> (maintainer)
This commit is contained in:
Pav Lucistnik 2004-11-04 22:49:52 +00:00
parent 4efd187cf4
commit 3e7c489b9d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=120820
11 changed files with 183 additions and 163 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= clamav
PORTVERSION= 20040826
PORTVERSION= 20041101
CATEGORIES= security
MASTER_SITES= http://www.clamav.net/snapshot/
PKGNAMESUFFIX= -devel
@ -23,9 +23,9 @@ RUN_DEPENDS= lha:${PORTSDIR}/archivers/lha \
arc:${PORTSDIR}/archivers/arc \
unzip:${PORTSDIR}/archivers/unzip
OPTIONS= MILTER "Compile the milter interface" off
OPTIONS= MILTER "Compile the milter interface" Off \
CURL "Support URL downloading" Off
USE_REINPLACE= yes
USE_GMAKE= yes
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
USE_AUTOCONF_VER=259
@ -35,10 +35,17 @@ LIBTOOLFILES= acinclude.m4
INSTALLS_SHLIB= yes
USE_RC_SUBR= yes
PKGINSTALL= ${WRKDIR}/pkg-install
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
PORTDOCS= NEWS ChangeLog html
CONFIGURE_ARGS= --with-dbdir=${DATADIR} \
--disable-clamuko \
--disable-clamav \
--enable-bigstack \
--disable-gethostbyname_r \
--enable-readdir_r \
--disable-dependency-tracking
CPPFLAGS+= -I${LOCALBASE}/include
CFLAGS+= ${PTHREAD_CFLAGS} -I${LOCALBASE}/include
@ -46,16 +53,15 @@ LDFLAGS+= ${PTHREAD_LIBS} -L${LOCALBASE}/lib
CONFIGURE_ENV+= CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CPPFLAGS="${CPPFLAGS}"
MAN1= clamscan.1 freshclam.1 sigtool.1 clamdscan.1
MAN5= clamav.conf.5 freshclam.conf.5
MAN5= clamd.conf.5 freshclam.conf.5
MAN8= clamd.8 clamav-milter.8
CONFLICTS= clamav-0.*
CONFLICTS= clamav-0.[0-9]*
CLAMAVUSER?= clamav
CLAMAVGROUP?= clamav
CLAMAV_CLAMD_SOCKET?= /var/run/clamav/clamd
CLAMAV_MILTER_SOCKET?= /var/run/clamav/clmilter.sock
DOCSDIR?= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' \
-e 's|%%DATADIR%%|${DATADIR}|g' \
@ -65,12 +71,13 @@ SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' \
-e 's|%%CLAMAV_MILTER_SOCKET%%|${CLAMAV_MILTER_SOCKET}|g'
SED_CONF= -E -e 's|^\#?(Example)$$|\#\1|' \
-e 's|^\#?(LogFile) .*$$|\1 /var/log/clamav/clamd.log|' \
-e 's|^\#?(PidFile) .*$$|\1 /var/run/clamav/clamd.pid|' \
-e 's|^\#?((Update)?LogFile) .*/([a-z]+\.log)$$|\1 /var/log/clamav/\3|' \
-e 's|^\#?(PidFile) .*/([a-z]+\.pid)$$|\1 /var/run/clamav/\2|' \
-e 's|^\#?(LocalSocket) .*$$|\1 ${CLAMAV_CLAMD_SOCKET}|' \
-e 's|^\#?(User) .*$$|\1 ${CLAMAVUSER}|' \
-e 's|^\#?(AllowSupplementaryGroups)$$|\1|' \
-e 's|^\#?(ScanMail)$$|\1|' \
-e 's|^\#?(NotifyClamd)$$|\1|' \
-e 's|^\#?(Checks)$$|\#\1|' \
-e 's|^\#?(DatabaseDirectory) .*$$|\1 ${DATADIR}|' \
-e 's|^\#?(DatabaseOwner) .*$$|\1 ${CLAMAVUSER}|' \
@ -90,14 +97,12 @@ PLIST_SUB+= RC_DIR=${RC_DIR} \
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 501001
# compiles only with libcipher
LDFLAGS+= -lcipher
.endif
.if defined(WITH_MILTER)
.if !exists(/usr/lib/libmilter.a)
BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail
CONFIGURE_ENV+= SENDMAIL="${LOCALBASE}/sbin/sendmail"
.else
CONFIGURE_ENV+= SENDMAIL="/usr/sbin/sendmail"
.endif
CONFIGURE_ARGS+= --enable-milter
PLIST_SUB+= CLAMAV-MILTER=""
@ -105,58 +110,64 @@ PLIST_SUB+= CLAMAV-MILTER=""
PLIST_SUB+= CLAMAV-MILTER="@comment "
.endif
post-patch:
@${REINPLACE_CMD} -e 's|/usr/lib/sendmail|/usr/sbin/sendmail|g' \
${WRKSRC}/clamav-milter/clamav-milter.c
@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|' \
${WRKSRC}/Makefile.am
.if defined(WITH_CURL)
LIB_DEPENDS+= curl.3:${PORTSDIR}/ftp/curl
CONFIGURE_ARGS+= --with-libcurl
.else
CONFIGURE_ARGS+= --without-libcurl
.endif
pre-configure:
@cd ${WRKSRC} && ${ACLOCAL}
pre-build:
@if ${LDCONFIG} -r | ${GREP} -qw -e -lclamav; then \
${ECHO_MSG} "===> *** WARNING ***"; \
${ECHO_MSG} " Installed version of libclamav found."; \
${ECHO_MSG} " This might cause build problems."; \
fi
post-build:
@${SED} ${SED_CONF} ${BUILD_WRKSRC}/etc/clamav.conf \
> ${BUILD_WRKSRC}/etc/clamav.conf.default
@${CP} ${BUILD_WRKSRC}/etc/clamav.conf.default \
${BUILD_WRKSRC}/etc/clamav.conf
@${SED} ${SED_CONF} ${BUILD_WRKSRC}/etc/freshclam.conf \
> ${BUILD_WRKSRC}/etc/freshclam.conf.default
@${CP} ${BUILD_WRKSRC}/etc/freshclam.conf.default \
${BUILD_WRKSRC}/etc/freshclam.conf
@${REINPLACE_CMD} ${SED_CONF} ${BUILD_WRKSRC}/etc/clamd.conf
@${REINPLACE_CMD} ${SED_CONF} ${BUILD_WRKSRC}/etc/freshclam.conf
@${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-install >${PKGINSTALL}
@${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-deinstall >${PKGDEINSTALL}
@${SED} ${SED_SCRIPT} ${FILESDIR}/clamav-clamd.sh \
> ${WRKDIR}/clamav-clamd.sh
@${SED} ${SED_SCRIPT} ${FILESDIR}/clamav-milter.sh \
> ${WRKDIR}/clamav-milter.sh
>${WRKDIR}/clamav-clamd.sh
@${SED} ${SED_SCRIPT} ${FILESDIR}/clamav-freshclam.sh \
> ${WRKDIR}/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} \
@${SETENV} PKG_PREFIX=${PREFIX} PKG_DESTDIR=${DESTDIR} \
${SH} ${PKGINSTALL} ${PREFIX} PRE-INSTALL
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/docs/*pdf ${DOCSDIR}
.endif
post-install:
@[ -f ${PREFIX}/etc/clamav.conf ] || \
${CP} ${BUILD_WRKSRC}/etc/clamav.conf.default \
${PREFIX}/etc/clamav.conf
@[ -f ${PREFIX}/etc/clamav.conf.default ] || \
${CP} ${BUILD_WRKSRC}/etc/clamav.conf.default \
${PREFIX}/etc/clamav.conf.default
@[ -f ${PREFIX}/etc/freshclam.conf ] || \
${CP} ${BUILD_WRKSRC}/etc/freshclam.conf.default \
${PREFIX}/etc/freshclam.conf
@[ -f ${PREFIX}/etc/freshclam.conf.default ] || \
${CP} ${BUILD_WRKSRC}/etc/freshclam.conf.default \
${PREFIX}/etc/freshclam.conf.default
@${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${DATADIR}
@${INSTALL_SCRIPT} ${WRKDIR}/clamav-clamd.sh \
${RC_DIR}/clamav-clamd${RC_SUFX}
${DESTDIR}${RC_DIR}/clamav-clamd${RC_SUFX}
@${INSTALL_SCRIPT} ${WRKDIR}/clamav-freshclam.sh \
${RC_DIR}/clamav-freshclam${RC_SUFX}
${DESTDIR}${RC_DIR}/clamav-freshclam${RC_SUFX}
@${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${DESTDIR}${DATADIR}
.for c in clamd freshclam
@[ -f ${DESTDIR}${PREFIX}/etc/${c}.conf ] || \
${CP} ${DESTDIR}${PREFIX}/etc/${c}.conf.default ${DESTDIR}${PREFIX}/etc/${c}.conf
.endfor
.if defined(WITH_MILTER)
@${INSTALL_SCRIPT} ${WRKDIR}/clamav-milter.sh \
${RC_DIR}/clamav-milter${RC_SUFX}
${DESTDIR}${RC_DIR}/clamav-milter${RC_SUFX}
.endif
.if !defined(NOPORTDOCS)
@${MKDIR} ${DESTDIR}${DOCSDIR}
@${INSTALL_DATA} ${INSTALL_WRKSRC}/NEWS ${INSTALL_WRKSRC}/ChangeLog \
${DESTDIR}${DOCSDIR}
@${MKDIR} ${DESTDIR}${DOCSDIR}/html
@${INSTALL_DATA} ${INSTALL_WRKSRC}/docs/html/*.* \
${DESTDIR}${DOCSDIR}/html
.endif
@${SETENV} PKG_PREFIX=${PREFIX} PKG_DESTDIR=${DESTDIR} \
${SH} ${PKGINSTALL} ${PREFIX} POST-INSTALL
.include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
MD5 (clamav-devel-20040826.tar.gz) = c739f4d138863a27ce57976e6bb67deb
SIZE (clamav-devel-20040826.tar.gz) = 1660493
MD5 (clamav-devel-20041101.tar.gz) = 47e175c4ff831d4afd6b29ebce62605b
SIZE (clamav-devel-20041101.tar.gz) = 1312776

View File

@ -24,20 +24,12 @@ rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/clamd
pidfile=/var/run/clamav/clamd.pid
required_dirs=%%DATADIR%%
required_files=%%PREFIX%%/etc/clamav.conf
required_files=%%PREFIX%%/etc/clamd.conf
stop_postcmd=stop_postcmd
# read settings, set default values
load_rc_config "$name"
: ${clamav_clamd_enable="NO"}
: ${clamav_clamd_flags=""}
: ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"}
stop_postcmd()
{
rm -f $pidfile
}
# set defaults
clamav_clamd_enable=${clamav_clamd_enable:-"NO"}
clamav_clamd_flags=${clamav_clamd_flags:-""}
clamav_clamd_socket=${clamav_clamd_socket:-"%%CLAMAV_CLAMD_SOCKET%%"}
load_rc_config $name
run_rc_command "$1"

View File

@ -9,7 +9,7 @@
# KEYWORD: FreeBSD shutdown
#
# Add the following lines to /etc/rc.conf to enable freshclam daemon:
# Add the following lines to /etc/rc.conf to enable the freshclam daemon:
#
#clamav_freshclam_enable="YES"
#
@ -22,16 +22,14 @@ name=clamav_freshclam
rcvar=`set_rcvar`
command=%%PREFIX%%/bin/freshclam
pidfile=/var/run/clamav/freshclam.pid
command_args="--daemon"
required_dirs=%%DATADIR%%
required_files=%%PREFIX%%/etc/freshclam.conf
# set defaults
# read settings, set default values
load_rc_config "$name"
: ${clamav_freshclam_enable="NO"}
: ${clamav_freshclam_flags=""}
clamav_freshclam_enable=${clamav_freshclam_enable:-"NO"}
clamav_freshclam_flags=${clamav_freshclam_flags:-"--pid=/var/run/clamav/freshclam.pid --daemon-notify=%%PREFIX%%/etc/clamav.conf"}
load_rc_config $name
# add --daemon to any given arguments
clamav_freshclam_flags="${clamav_freshclam_flags} --daemon"
run_rc_command "$1"

View File

@ -23,7 +23,7 @@ rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/clamav-milter
required_dirs=%%DATADIR%%
required_files=%%PREFIX%%/etc/clamav.conf
required_files=%%PREFIX%%/etc/clamd.conf
start_precmd=start_precmd
@ -33,15 +33,14 @@ start_precmd()
warn "Stale socket $clamav_milter_socket removed."
rm "$clamav_milter_socket"
fi
rc_flags="${flags:-$clamav_milter_flags} $clamav_milter_socket"
}
# set defaults
clamav_milter_enable=${clamav_milter_enable:-"NO"}
clamav_milter_socket=${clamav_milter_socket:-"%%CLAMAV_MILTER_SOCKET%%"}
clamav_milter_flags=${clamav_milter_flags:-"--postmaster-only --local --outgoing --max-children=50"}
# read settings, set default values
load_rc_config $name
: ${clamav_milter_enable="NO"}
: ${clamav_milter_socket="%%CLAMAV_MILTER_SOCKET%%"}
: ${clamav_milter_flags="--postmaster-only --local --outgoing --max-children=50"}
# add socket to any given argument
clamav_milter_flags="${clamav_milter_flags} ${clamav_milter_socket}"

View File

@ -0,0 +1,10 @@
--- Makefile.am.orig Sat Oct 16 17:43:47 2004
+++ Makefile.am Sat Oct 16 17:44:12 2004
@@ -20,6 +20,6 @@
bin_SCRIPTS=clamav-config
-pkgconfigdir = $(libdir)/pkgconfig
+pkgconfigdir = $(prefix)/libdata/pkgconfig
pkgconfig_DATA = libclamav.pc

View File

@ -9,27 +9,4 @@
- CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -pthread -lc_r"
TH_SAFE="-thread-safe"
AC_DEFINE(CL_THREAD_SAFE,1,[thread safe])
AC_DEFINE(_REENTRANT,1,[thread safe])
@@ -510,6 +507,8 @@
dnl Check for gethostbyname_r and number of its arguments
dnl Code from libwww/configure.in
+AC_CHECK_FUNC(gethostbyname_r)
+if test $ac_cv_func_gethostbyname_r = 'yes'; then
AC_MSG_CHECKING(for gethostbyname_r)
if test -z "$ac_cv_gethostbyname_args"; then
AC_TRY_COMPILE(
@@ -565,6 +564,13 @@
AC_DEFINE(HAVE_GETHOSTBYNAME_R_6,1,[gethostbyname_r takes 6 arguments])
fi
AC_MSG_RESULT([yes, and it takes $ac_cv_gethostbyname_args arguments])
+fi
+else
+dnl Check for gethostbyname()
+AC_CHECK_FUNC(gethostbyname)
+if test $ac_cv_func_gethostbyname = 'no'; then
+ AC_MSG_ERROR(***** fail on check gethostbyname())
+fi
fi
dnl Check for clamav in /etc/passwd
AC_DEFINE(_REENTRANT,1,[thread safe])

View File

@ -0,0 +1,12 @@
--- etc/Makefile.am.orig Sat Oct 2 23:09:13 2004
+++ etc/Makefile.am Sun Oct 17 13:04:24 2004
@@ -20,7 +20,5 @@
install:
$(mkinstalldirs) $(DESTDIR)$(CFGINST)
- @test -f $(DESTDIR)$(CFGINST)/clamd.conf || \
- $(INSTALL_DATA) $(srcdir)/clamd.conf $(DESTDIR)$(CFGINST)
- @test -f $(DESTDIR)$(CFGINST)/freshclam.conf || \
- $(INSTALL_DATA) $(srcdir)/freshclam.conf $(DESTDIR)$(CFGINST)
+ $(INSTALL_DATA) $(srcdir)/clamd.conf $(DESTDIR)$(CFGINST)/clamd.conf.default
+ $(INSTALL_DATA) $(srcdir)/freshclam.conf $(DESTDIR)$(CFGINST)/freshclam.conf.default

View File

@ -1,7 +1,13 @@
if [ ! "$2" = "POST-DEINSTALL" ]; then
#!/bin/sh
# $FreeBSD$
if [ "$2" != "POST-DEINSTALL" ]; then
exit 0
fi
echo "----------------------------------------------------------"
echo " If you really want to remove this package, please remove"
echo " the clamav-user and clean out log files and database"
echo "----------------------------------------------------------"
CLAMAVUSER=%%CLAMAVUSER%%
if pw usershow "${CLAMAVUSER}" 2>/dev/null 1>&2; then
echo "To delete ${CLAMAVUSER} user permanently, use 'pw userdel \"${CLAMAVUSER}\"'"
fi
exit 0

View File

@ -1,50 +1,71 @@
#!/bin/sh
# $FreeBSD: /tmp/pcvs/ports/security/clamav-devel/Attic/pkg-install,v 1.17 2004-11-04 22:49:52 pav Exp $
PREFIX=${PKG_PREFIX:-%%PREFIX%%}
DESTDIR=${PKG_DESTDIR:-}
CLAMAVUSER=%%CLAMAVUSER%%
CLAMAVGROUP=%%CLAMAVGROUP%%
UID=106
GID=$UID
CLAMRUN=$DESTDIR/var/run/clamav
CLAMLOG=$DESTDIR/var/log/clamav
DATADIR=$DESTDIR%%DATADIR%%
if [ "$2" = "PRE-INSTALL" ]; then
if [ -z "${CLAMAVUSER}" ]; then
CLAMAVUSER=clamav
fi
if [ -z "${CLAMAVGROUP}" ]; then
CLAMAVGROUP=clamav
fi
UID=106
GID=${UID}
CLAMRUN=/var/run/clamav
CLAMLOG=/var/log/clamav
echo "===> Adding user \"${CLAMAVUSER}\" if necessary."
if ! pw groupshow "${CLAMAVGROUP}" 2>/dev/null 1>&2; then
if pw groupadd ${CLAMAVGROUP} -g ${GID}; then
echo "===> Added group \"${CLAMAVGROUP}\"."
else
echo "===> Adding group \"${CLAMAVGROUP}\" failed..."
exit 1
if ! pw groupshow "$CLAMAVGROUP" 2>/dev/null 1>&2; then
if pw groupadd $CLAMAVGROUP -g $GID; then
echo "=> Added group \"$CLAMAVGROUP\"."
else
echo "=> Adding group \"$CLAMAVGROUP\" failed..."
exit 1
fi
fi
fi
if ! pw usershow "${CLAMAVUSER}" 2>/dev/null 1>&2; then
if pw useradd ${CLAMAVUSER} -u ${UID} -g ${CLAMAVGROUP} -h - \
-s "/usr/sbin/nologin" -d "/nonexistent" \
-c "Clam Antivirus"; \
then
echo "===> Added user \"${CLAMAVUSER}\"."
pw groupmod mail -m ${CLAMAVUSER}
else
echo "===> Adding user \"${CLAMAVUSER}\" failed..."
exit 1
fi
fi
if ! pw usershow "$CLAMAVUSER" 2>/dev/null 1>&2; then
if pw useradd $CLAMAVUSER -u $UID -g $CLAMAVGROUP -h - \
-s "/sbin/nologin" -d "/nonexistent" \
-c "Clam Antivirus"; \
then
pw groupmod mail -m $CLAMAVUSER
echo "=> Added user \"$CLAMAVUSER\"."
else
echo "=> Adding user \"$CLAMAVUSER\" failed..."
exit 1
fi
fi
echo "===> Setting permissions..."
mkdir -p "${CLAMRUN}"
chown "${CLAMAVUSER}:${CLAMAVGROUP}" "${CLAMRUN}"
elif [ "$2" = "POST-INSTALL" ]; then
if [ ! -d "$CLAMRUN" ]; then
mkdir -p "$CLAMRUN" || exit 1
chown "$CLAMAVUSER:$CLAMAVGROUP" "$CLAMRUN" || exit 1
fi
if [ ! -d "$CLAMLOG" ]; then
mkdir -p "$CLAMLOG" || exit 1
chown "$CLAMAVUSER:$CLAMAVGROUP" "$CLAMLOG" || exit 1
fi
if [ ! -d "$DATADIR" ]; then
mkdir -p "$DATADIR" || exit 1
chown "$CLAMAVUSER:$CLAMAVGROUP" "$DATADIR" || exit 1
fi
if [ -f "$DESTDIR$PREFIX/etc/clamav.conf" ]; then
echo
echo "**************** WARNING ****************"
echo "* *"
echo "* The configuration file has changed: *"
echo "* Please edit $PREFIX/etc/clamd.conf *"
echo "* and remove $PREFIX/etc/clamav.conf *"
echo "* *"
echo "**************** WARNING ****************"
echo
fi
mkdir -p "${CLAMLOG}"
chown "${CLAMAVUSER}:${CLAMAVGROUP}" "${CLAMLOG}"
fi
exit 0

View File

@ -1,3 +1,4 @@
@comment $FreeBSD$
@unexec [ ! -f /var/run/clamav/clamd.pid ] || %%RC_DIR%%/clamav-clamd%%RC_SUFX%% stop || true
@unexec [ ! -f /var/run/clamav/freshclam.pid ] || %%RC_DIR%%/clamav-freshclam%%RC_SUFX%% stop || true
bin/clamav-config
@ -15,21 +16,14 @@ lib/libclamav.so.1
lib/libclamav.so
lib/libclamav.a
libdata/pkgconfig/libclamav.pc
%%PORTDOCS%%%%DOCSDIR%%/clamav-mirror-howto.pdf
%%PORTDOCS%%%%DOCSDIR%%/clamdoc.pdf
%%PORTDOCS%%%%DOCSDIR%%/signatures.pdf
@unexec if cmp -s %D/etc/clamav.conf %D/etc/clamav.conf.default; then rm -f %D/etc/clamav.conf; fi
etc/clamav.conf.default
@exec [ -f %B/clamav.conf ] || cp %B/%f %B/clamav.conf
@unexec if cmp -s %D/etc/clamd.conf %D/etc/clamd.conf.default; then rm -f %D/etc/clamd.conf; fi
etc/clamd.conf.default
@exec [ -f %B/clamd.conf ] || cp %B/%f %B/clamd.conf
@unexec if cmp -s %D/etc/freshclam.conf %D/etc/freshclam.conf.default; then rm -f %D/etc/freshclam.conf; fi
etc/freshclam.conf.default
@exec [ -f %B/freshclam.conf ] || cp %B/%f %B/freshclam.conf
@owner %%CLAMAVUSER%%
@group %%CLAMAVGROUP%%
@exec chown %%CLAMAVUSER%%:%%CLAMAVGROUP%% %B
@unexec [ -s %D/%%DATADIR%%/main.cvd ] || rm -f %D/%%DATADIR%%/main.cvd
@unexec [ -s %D/%%DATADIR%%/daily.cvd ] || rm -f %D/%%DATADIR%%/daily.cvd
@unexec [ -s %D/%%DATADIR%%/daily.cvd ] || rm -f %D/%%DATADIR%%/daily.cvd || true
@unexec [ -s %D/%%DATADIR%%/main.cvd ] || rm -f %D/%%DATADIR%%/main.cvd || true
@unexec rmdir %D/%%DATADIR%% 2>/dev/null || true
@unexec rmdir /var/run/clamav 2>/dev/null || true
@unexec rmdir /var/log/clamav 2>/dev/null || true
%%PORTDOCS%%@dirrm %%DOCSDIR%%