aboutsummaryrefslogtreecommitdiffstats
path: root/security/clamav
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2003-10-26 04:52:32 +0800
committerdinoex <dinoex@FreeBSD.org>2003-10-26 04:52:32 +0800
commit92b30141bef2788a676f1138dd2b2126bedd2d5f (patch)
tree34bf71f4058ee7f32c50a89666b0b3fcf81353ac /security/clamav
parent318840199c64aa2d2521dbcd916624d8c334934d (diff)
downloadfreebsd-ports-gnome-92b30141bef2788a676f1138dd2b2126bedd2d5f.tar.gz
freebsd-ports-gnome-92b30141bef2788a676f1138dd2b2126bedd2d5f.tar.zst
freebsd-ports-gnome-92b30141bef2788a676f1138dd2b2126bedd2d5f.zip
- ensure that an stale clamd socket will be deleted. [1]
- Add conflict with clamav-devel port [2] - fix milter on STABLE [3] no response from maintainer PR: 57379, 58037 Submitted by: martin@mail.tradex.sk [1], rob@debank.tv [2], dinoex [3]
Diffstat (limited to 'security/clamav')
-rw-r--r--security/clamav/Makefile10
-rw-r--r--security/clamav/files/clamd.sh11
2 files changed, 19 insertions, 2 deletions
diff --git a/security/clamav/Makefile b/security/clamav/Makefile
index 114099fcde47..b02ff2a09303 100644
--- a/security/clamav/Makefile
+++ b/security/clamav/Makefile
@@ -7,7 +7,7 @@
PORTNAME= clamav
PORTVERSION= 0.60
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= clamav
@@ -40,8 +40,13 @@ MAN1= clamscan.1 freshclam.1 sigtool.1 clamdscan.1 clamav-milter.1
MAN5= clamav.conf.5
MAN8= clamd.8
+CLAMD_SOCKET?= /var/run/clamav/clamd
+
+CONFLICTS= clamav-devel-*
+
SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' \
- -e 's|%%DATADIR%%|${DATADIR}|g'
+ -e 's|%%DATADIR%%|${DATADIR}|g' \
+ -e 's|%%CLAMD_SOCKET%%|${CLAMD_SOCKET}|g'
SED_CONF= -E -e 's|^\#?(Example)$$|\#\1|' \
-e 's|^\#?(LogFile) .*$$|\1 /var/log/clamav/clamd.log|' \
@@ -69,6 +74,7 @@ LDFLAGS+= -lcipher
.endif
.if defined(WITH_MILTER)
+USE_GETOPT_LONG= yes
CONFIGURE_ARGS+= --enable-milter
PLIST_SUB+= CLAMAV-MILTER=""
.else
diff --git a/security/clamav/files/clamd.sh b/security/clamav/files/clamd.sh
index 3254acb2a0cb..9a5fe99cb911 100644
--- a/security/clamav/files/clamd.sh
+++ b/security/clamav/files/clamd.sh
@@ -26,6 +26,16 @@ pidfile=/var/run/clamav/clamd.pid
required_dirs=%%DATADIR%%
required_files=%%PREFIX%%/etc/clamav.conf
+start_precmd=start_precmd
+
+start_precmd()
+{
+ if [ -S "$clamd_socket" ]; then
+ warn "Stale socket $clamd_socket removed."
+ rm "$clamd_socket"
+ fi
+}
+
stop_postcmd=stop_postcmd
stop_postcmd()
@@ -37,6 +47,7 @@ stop_postcmd()
clamd_enable=${clamd_enable:-"NO"}
clamd_flags=${clamd_flags:-""}
+clamd_socket=${clamd_socket:-"%%CLAMD_SOCKET%%"}
load_rc_config $name
run_rc_command "$1"