mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-29 01:13:08 +00:00
- Unbreak threading issue
PR: 63022 Submitted by: rob@debank.tv - Use fixStaleSocket by default - Add clamav user to mail group (for exim users) - clean up DOCSDIR variable PR: 63022 Submitted by: rob@debank.tv Suggested by: eik
This commit is contained in:
parent
1cbb8439ea
commit
42331cf4dd
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=101346
@ -7,6 +7,7 @@
|
||||
|
||||
PORTNAME= clamav
|
||||
PORTVERSION= 20040210
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= http://clamav.sourceforge.net/snapshot/
|
||||
PKGNAMESUFFIX= -devel
|
||||
@ -47,6 +48,7 @@ CLAMAVUSER?= clamav
|
||||
CLAMAVGROUP?= clamav
|
||||
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}"
|
||||
@ -67,14 +69,11 @@ SED_CONF= -E -e 's|^\#?(Example)$$|\#\1|' \
|
||||
-e 's|^\#?(Checks)$$|\#\1|' \
|
||||
-e 's|^\#?(DatabaseDirectory) .*$$|\1 ${DATADIR}|' \
|
||||
-e 's|^\#?(DatabaseOwner) .*$$|\1 ${CLAMAVUSER}|' \
|
||||
-e 's|^\#?(UpdateLogFile) .*$$|\1 /var/log/clamav/freshclam.log|'
|
||||
-e 's|^\#?(UpdateLogFile) .*$$|\1 /var/log/clamav/freshclam.log|' \
|
||||
-e 's|^\#?(FixStaleSocket)$$|\1|'
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} >= 502102
|
||||
FORBIDDEN= "Links against conflicting thread libraries"
|
||||
.endif
|
||||
|
||||
USE_RC_SUBR= yes
|
||||
RC_DIR= ${PREFIX}/etc/rc.d
|
||||
RC_SUFX= .sh
|
||||
@ -98,7 +97,11 @@ PLIST_SUB+= CLAMAV-MILTER:="@comment "
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
.if ${OSVERSION} >= 502102
|
||||
@${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
|
||||
.else
|
||||
@${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
|
||||
.endif
|
||||
@${REINPLACE_CMD} -e 's|/usr/lib/sendmail|/usr/sbin/sendmail|g' \
|
||||
-e 's|<malloc.h>|<stdlib.h>|' \
|
||||
${WRKSRC}/clamav-milter/clamav-milter.c
|
||||
@ -118,8 +121,8 @@ pre-install:
|
||||
${SETENV} PKG_PREFIX=${PREFIX} \
|
||||
${SH} ${PKGINSTALL} ${PREFIX} PRE-INSTALL
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${MKDIR} ${DOCSDIR}${PKGNAMESUFFIX}
|
||||
@${INSTALL_DATA} ${WRKSRC}/docs/*pdf ${DOCSDIR}${PKGNAMESUFFIX}
|
||||
@${MKDIR} ${DOCSDIR}
|
||||
@${INSTALL_DATA} ${WRKSRC}/docs/*pdf ${DOCSDIR}
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
|
@ -26,16 +26,6 @@ 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()
|
||||
|
@ -4,3 +4,5 @@ database is kept up to date. It also detects polymorphic
|
||||
viruses, scans compressed files and is supported by AMaViS.
|
||||
Optionally you can use the clamav-milter interface to connect
|
||||
clamav with sendmail.
|
||||
|
||||
WWW: http://clamav.sourceforge.net/
|
||||
|
@ -29,6 +29,7 @@ if ! pw usershow "${CLAMAVUSER}" 2>/dev/null 1>&2; then
|
||||
-c "Clam Antivirus"; \
|
||||
then
|
||||
echo "===> Added user \"${CLAMAVUSER}\"."
|
||||
pw groupmod mail -m ${CLAMAVUSER}
|
||||
else
|
||||
echo "===> Adding user \"${CLAMAVUSER}\" failed..."
|
||||
exit 1
|
||||
|
@ -11,9 +11,9 @@ include/clamav.h
|
||||
lib/libclamav.so.1
|
||||
lib/libclamav.so
|
||||
lib/libclamav.a
|
||||
%%PORTDOCS%%%%DOCSDIR%%-devel/clamav-mirror-howto.pdf
|
||||
%%PORTDOCS%%%%DOCSDIR%%-devel/clamdoc.pdf
|
||||
%%PORTDOCS%%%%DOCSDIR%%-devel/signatures.pdf
|
||||
%%PORTDOCS%%%%DOCSDIR%%/clamav-mirror-howto.pdf
|
||||
%%PORTDOCS%%%%DOCSDIR%%/clamdoc.pdf
|
||||
%%PORTDOCS%%%%DOCSDIR%%/signatures.pdf
|
||||
@unexec if cmp -s %D/etc/clamav.conf %D/etc/clamav.conf.default; then rm -f %D/etc/clamav.conf; fi
|
||||
etc/clamav.conf.default
|
||||
@exec [ -f %B/clamav.conf ] || cp %B/%f %B/clamav.conf
|
||||
@ -29,4 +29,4 @@ etc/freshclam.conf.default
|
||||
@unexec rmdir %D/%%DATADIR%% 2>/dev/null || true
|
||||
@unexec rmdir /var/run/clamav 2>/dev/null || true
|
||||
@unexec rmdir /var/log/clamav 2>/dev/null || true
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%-devel
|
||||
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||
|
Loading…
Reference in New Issue
Block a user