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<rob@debank.tv> Approved by: TERAMOTO Masahiro <markun@onohara.to> (maintainer)
This commit is contained in:
parent
5dfaba8ea1
commit
15e2ad2845
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=83250
@ -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>
|
||||
|
@ -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
|
||||
|
@ -11,3 +11,4 @@ lib/libclamav.a
|
||||
share/clamav/viruses.db
|
||||
share/clamav/viruses.db2
|
||||
@dirrm share/clamav
|
||||
@unexec rmuser -y clamav
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
@ -11,3 +11,4 @@ lib/libclamav.a
|
||||
share/clamav/viruses.db
|
||||
share/clamav/viruses.db2
|
||||
@dirrm share/clamav
|
||||
@unexec rmuser -y clamav
|
||||
|
Loading…
Reference in New Issue
Block a user