aboutsummaryrefslogtreecommitdiffstats
path: root/security/clamav-devel
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2004-12-22 10:10:12 +0800
committeredwin <edwin@FreeBSD.org>2004-12-22 10:10:12 +0800
commit47788221e847c1e99dba231c1dde6883d76446c3 (patch)
treef1b1f6974ecbb0cd18df3d9142f52280d5623a88 /security/clamav-devel
parent440d97547238af95b7bde0ce99cfb676d04427a2 (diff)
downloadfreebsd-ports-graphics-47788221e847c1e99dba231c1dde6883d76446c3.tar.gz
freebsd-ports-graphics-47788221e847c1e99dba231c1dde6883d76446c3.tar.zst
freebsd-ports-graphics-47788221e847c1e99dba231c1dde6883d76446c3.zip
Fix ports: security/clamav and security/clamav-devel (change db
directory to /var/db/clamav and fix removal of db on deinstall) For the sake of coherence, the ClamAV database should be installed in /var/db/clamav, not /usr/local/share/clamav. Also fixes the database removal on package deinstallation. PR: ports/74172 Submitted by: Jean-Yves Lefort <jylefort@brutele.be> Approved by: Rob Evers <rob@debank.tv>
Diffstat (limited to 'security/clamav-devel')
-rw-r--r--security/clamav-devel/Makefile11
-rw-r--r--security/clamav-devel/files/clamav-clamd.sh2
-rw-r--r--security/clamav-devel/files/clamav-freshclam.sh2
-rw-r--r--security/clamav-devel/files/clamav-milter.sh2
-rw-r--r--security/clamav-devel/pkg-install10
-rw-r--r--security/clamav-devel/pkg-plist6
6 files changed, 18 insertions, 15 deletions
diff --git a/security/clamav-devel/Makefile b/security/clamav-devel/Makefile
index 69685207b69..16e02beac18 100644
--- a/security/clamav-devel/Makefile
+++ b/security/clamav-devel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= clamav
PORTVERSION= 20041213
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://www.clamav.net/snapshot/
PKGNAMESUFFIX= -devel
@@ -40,7 +41,9 @@ 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} \
--with-zlib=/usr \
--disable-zlib-vcheck \
--disable-clamuko \
@@ -66,7 +69,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' \
@@ -81,7 +84,7 @@ SED_CONF= -E -e 's|^\#?(Example)$$|\#\1|' \
-e 's|^\#?(ScanMail)$$|\1|' \
-e 's|^\#?(NotifyClamd)$$|\1|' \
-e 's|^\#?(Checks)$$|\#\1|' \
- -e 's|^\#?(DatabaseDirectory) .*$$|\1 ${DATADIR}|' \
+ -e 's|^\#?(DatabaseDirectory) .*$$|\1 ${DBDIR}|' \
-e 's|^\#?(DatabaseOwner) .*$$|\1 ${CLAMAVUSER}|' \
-e 's|^\#?(UpdateLogFile) .*$$|\1 /var/log/clamav/freshclam.log|' \
-e 's|^\#?(FixStaleSocket)$$|\1|'
@@ -152,7 +155,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-devel/files/clamav-clamd.sh b/security/clamav-devel/files/clamav-clamd.sh
index 453212555e2..ae1abb41681 100644
--- a/security/clamav-devel/files/clamav-clamd.sh
+++ b/security/clamav-devel/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-devel/files/clamav-freshclam.sh b/security/clamav-devel/files/clamav-freshclam.sh
index a4f710b2aa5..a17b236f5e5 100644
--- a/security/clamav-devel/files/clamav-freshclam.sh
+++ b/security/clamav-devel/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-devel/files/clamav-milter.sh b/security/clamav-devel/files/clamav-milter.sh
index e3679e66ec2..572a7556c71 100644
--- a/security/clamav-devel/files/clamav-milter.sh
+++ b/security/clamav-devel/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-devel/pkg-install b/security/clamav-devel/pkg-install
index f783cb52303..47c32f4de95 100644
--- a/security/clamav-devel/pkg-install
+++ b/security/clamav-devel/pkg-install
@@ -1,5 +1,5 @@
#!/bin/sh
-# $FreeBSD: /tmp/pcvs/ports/security/clamav-devel/Attic/pkg-install,v 1.17 2004-11-04 22:49:52 pav Exp $
+# $FreeBSD: /tmp/pcvs/ports/security/clamav-devel/Attic/pkg-install,v 1.18 2004-12-22 02:10:12 edwin Exp $
PREFIX=${PKG_PREFIX:-%%PREFIX%%}
DESTDIR=${PKG_DESTDIR:-}
@@ -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-devel/pkg-plist b/security/clamav-devel/pkg-plist
index 559fc5ddc71..a9a4485f7b6 100644
--- a/security/clamav-devel/pkg-plist
+++ b/security/clamav-devel/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
-@unexec rmdir %D/%%DATADIR%% 2>/dev/null || true
+@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