- Update to 20040524
- Rename rc script freshclam.sh -> clamav-freshclam.sh for consistency BEWARE if you're using freshclam daemon you must update your rc.conf! - Chmod 770 socket directory - Diff reduction against security/clamav port PR: ports/67125 Submitted by: Rob Evers <rob@debank.tv> (maintainer)
This commit is contained in:
parent
fbd0fe5998
commit
43b97c030d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=109907
5 changed files with 19 additions and 15 deletions
|
@ -6,7 +6,7 @@
|
|||
#
|
||||
|
||||
PORTNAME= clamav
|
||||
PORTVERSION= 20040521
|
||||
PORTVERSION= 20040524
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= http://clamav.sourceforge.net/snapshot/
|
||||
PKGNAMESUFFIX= -devel
|
||||
|
@ -55,9 +55,6 @@ CLAMAV_CLAMD_SOCKET?= /var/run/clamav/clamd
|
|||
CLAMAV_MILTER_SOCKET?= /var/run/clamav/clmilter.sock
|
||||
DOCSDIR?= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX}
|
||||
|
||||
PLIST_SUB+= CLAMAVUSER="${CLAMAVUSER}"
|
||||
PLIST_SUB+= CLAMAVGROUP="${CLAMAVGROUP}"
|
||||
|
||||
SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' \
|
||||
-e 's|%%DATADIR%%|${DATADIR}|g' \
|
||||
-e 's|%%CLAMAVUSER%%|${CLAMAVUSER}|g' \
|
||||
|
@ -78,6 +75,9 @@ SED_CONF= -E -e 's|^\#?(Example)$$|\#\1|' \
|
|||
-e 's|^\#?(UpdateLogFile) .*$$|\1 /var/log/clamav/freshclam.log|' \
|
||||
-e 's|^\#?(FixStaleSocket)$$|\1|'
|
||||
|
||||
PLIST_SUB+= CLAMAVUSER=${CLAMAVUSER} \
|
||||
CLAMAVGROUP=${CLAMAVGROUP}
|
||||
|
||||
RC_DIR= ${PREFIX}/etc/rc.d
|
||||
RC_SUFX= .sh
|
||||
SED_SCRIPT+= -e 's|%%RC_SUBR%%|${RC_SUBR}|g' \
|
||||
|
@ -105,7 +105,6 @@ PLIST_SUB+= CLAMAV-MILTER="@comment "
|
|||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|/usr/lib/sendmail|/usr/sbin/sendmail|g' \
|
||||
-e 's|<malloc.h>|<stdlib.h>|' \
|
||||
${WRKSRC}/clamav-milter/clamav-milter.c
|
||||
|
||||
post-build:
|
||||
|
@ -121,7 +120,8 @@ post-build:
|
|||
> ${WRKDIR}/clamav-clamd.sh
|
||||
@${SED} ${SED_SCRIPT} ${FILESDIR}/clamav-milter.sh \
|
||||
> ${WRKDIR}/clamav-milter.sh
|
||||
@${SED} ${SED_SCRIPT} ${FILESDIR}/freshclam.sh > ${WRKDIR}/freshclam.sh
|
||||
@${SED} ${SED_SCRIPT} ${FILESDIR}/clamav-freshclam.sh \
|
||||
> ${WRKDIR}/clamav-freshclam.sh
|
||||
|
||||
pre-install:
|
||||
@${SETENV} PKG_PREFIX=${PREFIX} \
|
||||
|
@ -147,7 +147,8 @@ post-install:
|
|||
@${CHOWN} -R ${CLAMAVUSER}:${CLAMAVGROUP} ${DATADIR}
|
||||
@${INSTALL_SCRIPT} ${WRKDIR}/clamav-clamd.sh \
|
||||
${RC_DIR}/clamav-clamd${RC_SUFX}
|
||||
@${INSTALL_SCRIPT} ${WRKDIR}/freshclam.sh ${RC_DIR}/freshclam${RC_SUFX}
|
||||
@${INSTALL_SCRIPT} ${WRKDIR}/clamav-freshclam.sh \
|
||||
${RC_DIR}/clamav-freshclam${RC_SUFX}
|
||||
.if defined(WITH_MILTER)
|
||||
@${INSTALL_SCRIPT} ${WRKDIR}/clamav-milter.sh \
|
||||
${RC_DIR}/clamav-milter${RC_SUFX}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
MD5 (clamav-devel-20040521.tar.gz) = 2a6101b4af51addd1a615c203c57b6f2
|
||||
SIZE (clamav-devel-20040521.tar.gz) = 1522094
|
||||
MD5 (clamav-devel-20040524.tar.gz) = 755e50b289c3a8bc7d629c2cc1493359
|
||||
SIZE (clamav-devel-20040524.tar.gz) = 1522132
|
||||
|
|
|
@ -11,25 +11,27 @@
|
|||
#
|
||||
# Add the following lines to /etc/rc.conf to enable freshclam daemon:
|
||||
#
|
||||
#freshclam_enable"YES"
|
||||
#clamav_freshclam_enable="YES"
|
||||
#
|
||||
# See freshclam(1) for flags
|
||||
#
|
||||
|
||||
. %%RC_SUBR%%
|
||||
|
||||
name=freshclam
|
||||
name=clamav_freshclam
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
command=%%PREFIX%%/bin/freshclam
|
||||
required_dirs=%%DATADIR%%
|
||||
required_files=%%PREFIX%%/etc/freshclam.conf
|
||||
|
||||
|
||||
# set defaults
|
||||
|
||||
freshclam_enable=${freshclam_enable:-"NO"}
|
||||
freshclam_flags=${freshclam_flags:-"--daemon"}
|
||||
clamav_freshclam_enable=${clamav_freshclam_enable:-"NO"}
|
||||
clamav_freshclam_flags=${clamav_freshclam_flags:-"--daemon-notify=%%PREFIX%%/etc/clamav.conf"}
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
# add --daemon to any given arguments
|
||||
clamav_freshclam_flags="${clamav_freshclam_flags} --daemon"
|
||||
run_rc_command "$1"
|
|
@ -38,6 +38,7 @@ fi
|
|||
|
||||
echo "===> Setting permissions..."
|
||||
mkdir -p "${CLAMRUN}"
|
||||
chmod 770 "${CLAMRUN}"
|
||||
chown "${CLAMAVUSER}:${CLAMAVGROUP}" "${CLAMRUN}"
|
||||
|
||||
mkdir -p "${CLAMLOG}"
|
||||
|
|
|
@ -4,7 +4,7 @@ bin/clamdscan
|
|||
bin/freshclam
|
||||
bin/sigtool
|
||||
etc/rc.d/clamav-clamd%%RC_SUFX%%
|
||||
etc/rc.d/freshclam%%RC_SUFX%%
|
||||
etc/rc.d/clamav-freshclam%%RC_SUFX%%
|
||||
%%CLAMAV-MILTER%%etc/rc.d/clamav-milter%%RC_SUFX%%
|
||||
%%CLAMAV-MILTER%%sbin/clamav-milter
|
||||
sbin/clamd
|
||||
|
|
Loading…
Reference in a new issue