aboutsummaryrefslogtreecommitdiffstats
path: root/security/clamav
diff options
context:
space:
mode:
Diffstat (limited to 'security/clamav')
-rw-r--r--security/clamav/Makefile17
-rw-r--r--security/clamav/pkg-install18
-rw-r--r--security/clamav/pkg-plist1
3 files changed, 24 insertions, 12 deletions
diff --git a/security/clamav/Makefile b/security/clamav/Makefile
index 93ecbdb71aa..d051d1a3ce5 100644
--- a/security/clamav/Makefile
+++ b/security/clamav/Makefile
@@ -9,7 +9,9 @@ PORTNAME= clamav
PORTVERSION= 0.54
PORTREVISION= 1
CATEGORIES= security
-MASTER_SITES= http://clamav.elektrapro.com/stable/
+MASTER_SITES= http://clamav.elektrapro.com/stable/ \
+ http://clamav.essentkabel.com/stable/
+
MAINTAINER= markun@onohara.to
COMMENT= Command line virus scanner written entirely in C
@@ -36,12 +38,13 @@ MAN8= clamd.8
.include <bsd.port.pre.mk>
-.if ${OSVERSION} >= 500000
-EXTRA_PATCHES= ${FILESDIR}/patch5-*
-.endif
-
pre-install:
- @${ECHO} "==> Creating custom user to run clamav..."
-# ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+ @${ECHO} "===> Creating custom user to run clamav..."
+ ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+
+post-install:
+ @${ECHO} "===> Setting permissions..."
+ @${SETENV} PKG_PREFIX=${PREFIX} ${sh} \
+ ${SH} ${PKGINSTALL} ${PREFIX} POST-INSTALL
.include <bsd.port.post.mk>
diff --git a/security/clamav/pkg-install b/security/clamav/pkg-install
index 4e257bc4ccf..e99d15038e6 100644
--- a/security/clamav/pkg-install
+++ b/security/clamav/pkg-install
@@ -1,11 +1,9 @@
#!/bin/sh
-if [ "$2" != "PRE-INSTALL" ]; then
- exit 0
-fi
+if [ "$2" = "PRE-INSTALL" ]; then
-USER?=clamav
-GROUP?=clamav
+USER=clamav
+GROUP=clamav
if ! pw groupshow "$GROUP" 2>/dev/null 1>&2; then
if pw groupadd $GROUP; then
@@ -27,4 +25,14 @@ if ! pw usershow "$USER" 2>/dev/null 1>&2; then
exit 1
fi
fi
+fi
+
+if [ "$2" = "POST-INSTALL" ]; then
+ chown -R clamav:clamav ${PKG_PREFIX}/share/clamav
+fi
+
+if [ "$2" != "POST-INSTALL" ] && [ "$2" != "PRE-INSTALL" ]; then
+ exit 0
+fi
+
exit 0
diff --git a/security/clamav/pkg-plist b/security/clamav/pkg-plist
index b919db1eb40..c561a92c33a 100644
--- a/security/clamav/pkg-plist
+++ b/security/clamav/pkg-plist
@@ -11,3 +11,4 @@ lib/libclamav.a
share/clamav/viruses.db
share/clamav/viruses.db2
@dirrm share/clamav
+@unexec rmuser -y clamav