aboutsummaryrefslogtreecommitdiff
path: root/security/clamav
diff options
context:
space:
mode:
authorYaroslav Tykhiy <ytykhiy@gmail.com>2005-01-27 12:28:08 +0000
committerYaroslav Tykhiy <ytykhiy@gmail.com>2005-01-27 12:28:08 +0000
commit6a31303cc5943818965a47deabeadb84327bda8d (patch)
treeabcf279e56fa1e9db9943b3e8305e2774f3666a5 /security/clamav
parentefe22691e4f5ea0a2f8ececbb4529f7082e9eb5b (diff)
downloadports-6a31303cc5943818965a47deabeadb84327bda8d.tar.gz
ports-6a31303cc5943818965a47deabeadb84327bda8d.zip
Notes
Diffstat (limited to 'security/clamav')
-rw-r--r--security/clamav/Makefile6
-rw-r--r--security/clamav/pkg-install12
-rw-r--r--security/clamav/pkg-plist2
3 files changed, 11 insertions, 9 deletions
diff --git a/security/clamav/Makefile b/security/clamav/Makefile
index 1e9a816bed80..659ba3620e98 100644
--- a/security/clamav/Makefile
+++ b/security/clamav/Makefile
@@ -40,8 +40,9 @@ PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
PORTDOCS= NEWS ChangeLog html
DBDIR= /var/db/clamav
+LOGDIR= /var/log/clamav
RUNDIR= /var/run/clamav
-PLIST_SUB+= DBDIR=${DBDIR} RUNDIR=${RUNDIR}
+PLIST_SUB+= DBDIR=${DBDIR} LOGDIR=${LOGDIR} RUNDIR=${RUNDIR}
CONFIGURE_ARGS= --with-dbdir=${DBDIR} \
--disable-clamuko \
@@ -69,6 +70,7 @@ CLAMAV_MILTER_SOCKET?= ${RUNDIR}/clmilter.sock
SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' \
-e 's|%%DBDIR%%|${DBDIR}|g' \
+ -e 's|%%LOGDIR%%|${LOGDIR}|g' \
-e 's|%%RUNDIR%%|${RUNDIR}|g' \
-e 's|%%CLAMAVUSER%%|${CLAMAVUSER}|g' \
-e 's|%%CLAMAVGROUP%%|${CLAMAVGROUP}|g' \
@@ -76,7 +78,7 @@ 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|^\#?((Update)?LogFile) .*/([a-z]+\.log)$$|\1 /var/log/clamav/\3|' \
+ -e 's|^\#?((Update)?LogFile) .*/([a-z]+\.log)$$|\1 ${LOGDIR}/\3|' \
-e 's|^\#?(PidFile) .*/([a-z]+\.pid)$$|\1 ${RUNDIR}/\2|' \
-e 's|^\#?(LocalSocket) .*$$|\1 ${CLAMAV_CLAMD_SOCKET}|' \
-e 's|^\#?(User) .*$$|\1 ${CLAMAVUSER}|' \
diff --git a/security/clamav/pkg-install b/security/clamav/pkg-install
index 4fb8222a95e5..91ec86b6b17b 100644
--- a/security/clamav/pkg-install
+++ b/security/clamav/pkg-install
@@ -9,8 +9,8 @@ CLAMAVGROUP=%%CLAMAVGROUP%%
UID=106
GID=$UID
-CLAMLOG=$DESTDIR/var/log/clamav
DBDIR=$DESTDIR%%DBDIR%%
+LOGDIR=$DESTDIR%%LOGDIR%%
RUNDIR=$DESTDIR%%RUNDIR%%
if [ "$2" = "PRE-INSTALL" ]; then
@@ -39,16 +39,16 @@ if [ "$2" = "PRE-INSTALL" ]; then
elif [ "$2" = "POST-INSTALL" ]; then
- if [ ! -d "$CLAMLOG" ]; then
- mkdir -p "$CLAMLOG" || exit 1
- chown "$CLAMAVUSER:$CLAMAVGROUP" "$CLAMLOG" || exit 1
- fi
-
if [ ! -d "$DBDIR" ]; then
mkdir -p "$DBDIR" || exit 1
chown "$CLAMAVUSER:$CLAMAVGROUP" "$DBDIR" || exit 1
fi
+ if [ ! -d "$LOGDIR" ]; then
+ mkdir -p "$LOGDIR" || exit 1
+ chown "$CLAMAVUSER:$CLAMAVGROUP" "$LOGDIR" || exit 1
+ fi
+
if [ ! -d "$RUNDIR" ]; then
mkdir -p "$RUNDIR" || exit 1
chown "$CLAMAVUSER:$CLAMAVGROUP" "$RUNDIR" || exit 1
diff --git a/security/clamav/pkg-plist b/security/clamav/pkg-plist
index 40083b15d9a8..c3ad2a52fa80 100644
--- a/security/clamav/pkg-plist
+++ b/security/clamav/pkg-plist
@@ -27,5 +27,5 @@ etc/freshclam.conf.default
@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 %%LOGDIR%% 2>/dev/null || true
@unexec rmdir %%RUNDIR%% 2>/dev/null || true
-@unexec rmdir /var/log/clamav 2>/dev/null || true