From 75b122cca08041d6c173232a3c0aa95b7a7770bf Mon Sep 17 00:00:00 2001 From: nork Date: Wed, 18 Jun 2003 09:43:05 +0000 Subject: o Add mirror site. o Remove unnecsesary patches for current. o Add/remove users when installing/removing. o Set permissions on virus database dir. PR: ports/53305 Submitted by: Rob Evers Approved by: TERAMOTO Masahiro (maintainer) --- security/clamav/Makefile | 17 ++++++++++------- security/clamav/pkg-install | 18 +++++++++++++----- security/clamav/pkg-plist | 1 + 3 files changed, 24 insertions(+), 12 deletions(-) (limited to 'security/clamav') diff --git a/security/clamav/Makefile b/security/clamav/Makefile index 93ecbdb71aad..d051d1a3ce56 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 -.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 diff --git a/security/clamav/pkg-install b/security/clamav/pkg-install index 4e257bc4ccf7..e99d15038e69 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 b919db1eb401..c561a92c33a9 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 -- cgit