aboutsummaryrefslogtreecommitdiff
path: root/security/clamav
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2004-12-22 02:10:12 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2004-12-22 02:10:12 +0000
commitd056ef091b1f6a4748dad929adedb59e06d133a5 (patch)
tree75238359919ea1ebf1d73a9c78430a9659afdccc /security/clamav
parent9bff2a45d31f726f0721ab7f8d102a110d3ec0f0 (diff)
downloadports-d056ef091b1f6a4748dad929adedb59e06d133a5.tar.gz
ports-d056ef091b1f6a4748dad929adedb59e06d133a5.zip
Notes
Diffstat (limited to 'security/clamav')
-rw-r--r--security/clamav/Makefile13
-rw-r--r--security/clamav/files/clamav-clamd.sh2
-rw-r--r--security/clamav/files/clamav-freshclam.sh2
-rw-r--r--security/clamav/files/clamav-milter.sh2
-rw-r--r--security/clamav/pkg-install8
-rw-r--r--security/clamav/pkg-plist6
6 files changed, 18 insertions, 15 deletions
diff --git a/security/clamav/Makefile b/security/clamav/Makefile
index 871a49847873..83495835e79c 100644
--- a/security/clamav/Makefile
+++ b/security/clamav/Makefile
@@ -7,7 +7,7 @@
PORTNAME= clamav
PORTVERSION= ${DISTVERSION:C/([a-z])[a-z]*/.\1/g:S/-/./g}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR= clamav
@@ -39,7 +39,10 @@ PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
PORTDOCS= NEWS ChangeLog html
-CONFIGURE_ARGS= --with-dbdir=${DATADIR} \
+DBDIR= /var/db/clamav
+PLIST_SUB+= DBDIR=${DBDIR}
+
+CONFIGURE_ARGS= --with-dbdir=${DBDIR} \
--disable-clamuko \
--disable-clamav \
--enable-bigstack \
@@ -64,7 +67,7 @@ CLAMAV_CLAMD_SOCKET?= /var/run/clamav/clamd
CLAMAV_MILTER_SOCKET?= /var/run/clamav/clmilter.sock
SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' \
- -e 's|%%DATADIR%%|${DATADIR}|g' \
+ -e 's|%%DBDIR%%|${DBDIR}|g' \
-e 's|%%CLAMAVUSER%%|${CLAMAVUSER}|g' \
-e 's|%%CLAMAVGROUP%%|${CLAMAVGROUP}|g' \
-e 's|%%CLAMAV_CLAMD_SOCKET%%|${CLAMAV_CLAMD_SOCKET}|g' \
@@ -78,7 +81,7 @@ SED_CONF= -E -e 's|^\#?(Example)$$|\#\1|' \
-e 's|^\#?(AllowSupplementaryGroups)$$|\1|' \
-e 's|^\#?(ScanMail)$$|\1|' \
-e 's|^\#?(NotifyClamd)$$|\1|' \
- -e 's|^\#?(DatabaseDirectory) .*$$|\1 ${DATADIR}|' \
+ -e 's|^\#?(DatabaseDirectory) .*$$|\1 ${DBDIR}|' \
-e 's|^\#?(DatabaseOwner) .*$$|\1 ${CLAMAVUSER}|' \
-e 's|^\#?(FixStaleSocket)$$|\1|'
@@ -149,7 +152,7 @@ post-install:
${DESTDIR}${RC_DIR}/clamav-clamd${RC_SUFX}
@${INSTALL_SCRIPT} ${WRKDIR}/clamav-freshclam.sh \
${DESTDIR}${RC_DIR}/clamav-freshclam${RC_SUFX}
- @${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${DESTDIR}${DATADIR}
+ @${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${DESTDIR}${DBDIR}
.for c in clamd freshclam
@[ -f ${DESTDIR}${PREFIX}/etc/${c}.conf ] || \
${CP} ${DESTDIR}${PREFIX}/etc/${c}.conf.default ${DESTDIR}${PREFIX}/etc/${c}.conf
diff --git a/security/clamav/files/clamav-clamd.sh b/security/clamav/files/clamav-clamd.sh
index 453212555e2f..ae1abb416814 100644
--- a/security/clamav/files/clamav-clamd.sh
+++ b/security/clamav/files/clamav-clamd.sh
@@ -23,7 +23,7 @@ rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/clamd
pidfile=/var/run/clamav/clamd.pid
-required_dirs=%%DATADIR%%
+required_dirs=%%DBDIR%%
required_files=%%PREFIX%%/etc/clamd.conf
# read settings, set default values
diff --git a/security/clamav/files/clamav-freshclam.sh b/security/clamav/files/clamav-freshclam.sh
index 0018f202c22d..35e6ea2b226a 100644
--- a/security/clamav/files/clamav-freshclam.sh
+++ b/security/clamav/files/clamav-freshclam.sh
@@ -24,7 +24,7 @@ rcvar=`set_rcvar`
command=%%PREFIX%%/bin/freshclam
pidfile=/var/run/clamav/freshclam.pid
command_args="--daemon"
-required_dirs=%%DATADIR%%
+required_dirs=%%DBDIR%%
required_files=%%PREFIX%%/etc/freshclam.conf
# read settings, set default values
diff --git a/security/clamav/files/clamav-milter.sh b/security/clamav/files/clamav-milter.sh
index 8af6441c6454..bd09f7ec0ac5 100644
--- a/security/clamav/files/clamav-milter.sh
+++ b/security/clamav/files/clamav-milter.sh
@@ -22,7 +22,7 @@ name=clamav_milter
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/clamav-milter
-required_dirs=%%DATADIR%%
+required_dirs=%%DBDIR%%
required_files=%%PREFIX%%/etc/clamd.conf
start_precmd=start_precmd
diff --git a/security/clamav/pkg-install b/security/clamav/pkg-install
index 47b6f7c7fc5d..697796086e36 100644
--- a/security/clamav/pkg-install
+++ b/security/clamav/pkg-install
@@ -11,7 +11,7 @@ GID=$UID
CLAMRUN=$DESTDIR/var/run/clamav
CLAMLOG=$DESTDIR/var/log/clamav
-DATADIR=$DESTDIR%%DATADIR%%
+DBDIR=$DESTDIR%%DBDIR%%
if [ "$2" = "PRE-INSTALL" ]; then
@@ -49,9 +49,9 @@ elif [ "$2" = "POST-INSTALL" ]; then
chown "$CLAMAVUSER:$CLAMAVGROUP" "$CLAMLOG" || exit 1
fi
- if [ ! -d "$DATADIR" ]; then
- mkdir -p "$DATADIR" || exit 1
- chown "$CLAMAVUSER:$CLAMAVGROUP" "$DATADIR" || exit 1
+ if [ ! -d "$DBDIR" ]; then
+ mkdir -p "$DBDIR" || exit 1
+ chown "$CLAMAVUSER:$CLAMAVGROUP" "$DBDIR" || exit 1
fi
if [ -f "$DESTDIR$PREFIX/etc/clamav.conf" ]; then
diff --git a/security/clamav/pkg-plist b/security/clamav/pkg-plist
index 54ec2ab0df47..a9a4485f7b61 100644
--- a/security/clamav/pkg-plist
+++ b/security/clamav/pkg-plist
@@ -22,8 +22,8 @@ etc/clamd.conf.default
@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
-@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
-@dirrm %%DATADIR%%
+@unexec [ ! -f %%DBDIR%%/daily.cvd ] || rm -f %%DBDIR%%/daily.cvd || true
+@unexec [ ! -f %%DBDIR%%/main.cvd ] || rm -f %%DBDIR%%/main.cvd || true
+@unexec rmdir %%DBDIR%%
@unexec rmdir /var/run/clamav 2>/dev/null || true
@unexec rmdir /var/log/clamav 2>/dev/null || true