Index: head/security/clamav-devel/Makefile =================================================================== --- head/security/clamav-devel/Makefile (revision 216536) +++ head/security/clamav-devel/Makefile (revision 216537) @@ -1,187 +1,186 @@ # New ports collection makefile for: clamav-devel # Date created: 13 June 2003 # Whom: Rob Evers # # $FreeBSD$ # PORTNAME= clamav -PORTVERSION= 20080520 -PORTREVISION= 2 +PORTVERSION= 20080708 CATEGORIES= security MASTER_SITES= http://www.clamav.net/snapshot/ \ ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= garga/clamav-devel PKGNAMESUFFIX= -devel DISTNAME= ${PORTNAME}${PKGNAMESUFFIX}-${PORTVERSION} MAINTAINER= garga@FreeBSD.org COMMENT= Command line virus scanner written entirely in C LIB_DEPENDS= gmp.7:${PORTSDIR}/math/libgmp4 OPTIONS= ARC "Enable arch archives support" On \ ARJ "Enable arj archives support" On \ LHA "Enable lha archives support" On \ UNZOO "Enable zoo archives support" On \ UNRAR "Enable rar archives support" On \ MILTER "Compile the milter interface" Off \ LDAP "libmilter was built with LDAP" Off \ ICONV "Enable ICONV support" Off \ STDERR "Print logs to stderr instead of stdout" Off USE_AUTOTOOLS= libtool:15 CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} USE_LDCONFIG= yes USE_RC_SUBR= clamav-clamd clamav-freshclam USE_GMAKE= yes PORTDOCS= * DBDIR= /var/db/clamav LOGDIR= /var/log/clamav RUNDIR= /var/run/clamav PLIST_SUB+= DBDIR=${DBDIR} LOGDIR=${LOGDIR} RUNDIR=${RUNDIR} CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" \ LDFLAGS="${LDFLAGS}" CONFIGURE_ARGS= --with-dbdir=${DBDIR} \ --with-zlib=/usr \ --disable-zlib-vcheck \ --disable-clamuko \ --disable-clamav \ --enable-bigstack \ --enable-readdir_r \ --disable-dependency-tracking \ --enable-gethostbyname_r \ --enable-experimental CPPFLAGS+= -I${LOCALBASE}/include \ ${PTHREAD_CFLAGS} LDFLAGS+= -L${LOCALBASE}/lib \ ${PTHREAD_LIBS} # This port has a problem with -pthread, # force to use -lthr until it's not fixed. PTHREAD_LIBS= -lthr MAN1= clamconf.1 \ clamscan.1 \ freshclam.1 \ sigtool.1 \ clamdscan.1 MAN5= clamd.conf.5 \ freshclam.conf.5 MAN8= clamd.8 \ clamav-milter.8 CONFLICTS= clamav-0.[0-9]* CLAMAVUSER?= clamav CLAMAVGROUP?= clamav CLAMAV_CLAMD_SOCKET?= ${RUNDIR}/clamd.sock CLAMAV_MILTER_SOCKET?= ${RUNDIR}/clmilter.sock SUB_FILES= pkg-install pkg-deinstall SUB_LIST+= DBDIR=${DBDIR} \ LOGDIR=${LOGDIR} \ RUNDIR=${RUNDIR} \ CLAMAVUSER=${CLAMAVUSER} \ CLAMAVGROUP=${CLAMAVGROUP} \ CLAMAV_CLAMD_SOCKET=${CLAMAV_CLAMD_SOCKET} \ CLAMAV_MILTER_SOCKET=${CLAMAV_MILTER_SOCKET} SED_CONF= -E -e 's|^\#?(Example)$$|\#\1|' \ -e 's|^\#?((Update)?LogFile) .*/([a-z]+\.log)$$|\1 ${LOGDIR}/\3|' \ -e 's|^\#?(PidFile) .*/([a-z]+\.pid)$$|\1 ${RUNDIR}/\2|' \ -e 's|^\#?(LocalSocket) .*$$|\1 ${CLAMAV_CLAMD_SOCKET}|' \ -e 's|^\#?(User) .*$$|\1 ${CLAMAVUSER}|' \ -e 's|^\#?(AllowSupplementaryGroups).*$$|\1 yes|' \ -e 's|^\#?(ScanMail).*$$|\1 yes|' \ -e 's|^\#?(DatabaseDirectory) .*$$|\1 ${DBDIR}|' \ -e 's|^\#?(DatabaseOwner) .*$$|\1 ${CLAMAVUSER}|' \ -e 's|^\#?(FixStaleSocket).*$$|\1 yes|' \ -e 's|^\#?(NotifyClamd) .*$$|\1 ${PREFIX}/etc/clamd.conf|' PLIST_SUB+= CLAMAVUSER=${CLAMAVUSER} \ CLAMAVGROUP=${CLAMAVGROUP} .include .if defined(WITH_ARC) RUN_DEPENDS+= arc:${PORTSDIR}/archivers/arc .endif .if defined(WITH_ARJ) RUN_DEPENDS+= arj:${PORTSDIR}/archivers/arj .endif .if defined(WITH_LHA) RUN_DEPENDS+= lha:${PORTSDIR}/archivers/lha .endif .if defined(WITH_UNZOO) RUN_DEPENDS+= unzoo:${PORTSDIR}/archivers/unzoo .endif .if defined(WITH_UNRAR) PLIST_SUB+= UNRAR="" .else PLIST_SUB+= UNRAR="@comment " CONFIGURE_ARGS+= --disable-unrar .endif .if defined(WITH_ICONV) CONFIGURE_ARGS+=--with-iconv USE_ICONV= yes .else CONFIGURE_ARGS+=--without-iconv .endif .if defined(WITH_MILTER) USE_RC_SUBR+= clamav-milter . if defined(WITH_LDAP) && exists(${LOCALBASE}/lib/libldap.so) USE_OPENLDAP= yes LDFLAGS+= -lldap . endif . if !exists(/usr/lib/libmilter.a) || exists(${LOCALBASE}/lib/libmilter.a) BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/sendmail CONFIGURE_ARGS+= --with-sendmail=${LOCALBASE}/sbin/sendmail . else CONFIGURE_ARGS+= --with-sendmail=/usr/sbin/sendmail . endif CONFIGURE_ARGS+= --enable-milter PLIST_SUB+= CLAMAV-MILTER="" .else PLIST_SUB+= CLAMAV-MILTER="@comment " .endif .if defined(WITH_STDERR) EXTRA_PATCHES+= ${FILESDIR}/extra-patch-shared_output.c .endif post-patch: @${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|g' \ ${WRKSRC}/${CONFIGURE_SCRIPT} @${REINPLACE_CMD} -E 's,^(pkgconfigdir = ).*$$,\1$$(prefix)/libdata/pkgconfig,g' \ ${WRKSRC}/Makefile.in @${REINPLACE_CMD} ${SED_CONF} \ ${WRKSRC}/etc/clamd.conf \ ${WRKSRC}/etc/freshclam.conf @${REINPLACE_CMD} -e 's|0x100000000|0x100000000ULL|g' \ ${WRKSRC}/libclamunrar/unrar.c pre-install: @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL post-install: @${INSTALL_DATA} ${WRKSRC}/clamav-config.h ${PREFIX}/include .for c in clamd freshclam @[ -f ${PREFIX}/etc/${c}.conf ] || \ ${CP} ${PREFIX}/etc/${c}.conf.default ${PREFIX}/etc/${c}.conf .endfor .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR}/html @${INSTALL_DATA} ${WRKSRC}/NEWS ${WRKSRC}/ChangeLog ${DOCSDIR} @${INSTALL_DATA} ${WRKSRC}/docs/html/* ${DOCSDIR}/html .endif @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .include Property changes on: head/security/clamav-devel/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.122 \ No newline at end of property +1.123 \ No newline at end of property Index: head/security/clamav-devel/distinfo =================================================================== --- head/security/clamav-devel/distinfo (revision 216536) +++ head/security/clamav-devel/distinfo (revision 216537) @@ -1,3 +1,3 @@ -MD5 (clamav-devel-20080520.tar.gz) = 6146ebaa53ad525e4b7b3e55844d255e -SHA256 (clamav-devel-20080520.tar.gz) = 69e34ca54097ea7d8343f090ee0c9de8cbf30cf87fe7cccb3d34a9cfcba7d633 -SIZE (clamav-devel-20080520.tar.gz) = 2691654 +MD5 (clamav-devel-20080708.tar.gz) = b07f99f8aa6c676f37f3a7b58e40b159 +SHA256 (clamav-devel-20080708.tar.gz) = dd999142aeaf7c986bfa95ead20191a2fe180c6186767f55d1ef44c1479141cd +SIZE (clamav-devel-20080708.tar.gz) = 2718651 Property changes on: head/security/clamav-devel/distinfo ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.78 \ No newline at end of property +1.79 \ No newline at end of property Index: head/security/clamav-devel/files/clamav-milter.in =================================================================== --- head/security/clamav-devel/files/clamav-milter.in (revision 216536) +++ head/security/clamav-devel/files/clamav-milter.in (revision 216537) @@ -1,76 +1,92 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: clamav-milter # REQUIRE: LOGIN clamd # BEFORE: mail # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable clamav-milter: # #clamav_milter_enable="YES" # # See clamav-milter(1) for flags # . %%RC_SUBR%% name=clamav_milter rcvar=`set_rcvar` command=%%PREFIX%%/sbin/clamav-milter pidfile=%%RUNDIR%%/clamav-milter.pid required_dirs=%%DBDIR%% required_files=%%PREFIX%%/etc/clamd.conf start_precmd=start_precmd start_postcmd=start_postcmd start_precmd() { if [ -S "$clamav_milter_socket" ]; then warn "Stale socket $clamav_milter_socket removed." rm "$clamav_milter_socket" fi rc_flags="--pidfile ${pidfile} ${flags:-$clamav_milter_flags} $clamav_milter_socket" if checkyesno clamav_clamd_enable && [ "x$clamav_clamd_socket" != "x" ]; then echo -n "Waiting for clamd socket.. " i=${clamav_milter_socktimeout} while [ $i -ne 0 ] do [ -S "$clamav_clamd_socket" ] && break if [ `expr $i % 10` -eq 0 ]; then echo -n "${i}.. " fi sleep 1 i=$(($i-1)) done echo if [ $i -eq 0 ]; then echo "There is no clamd socket (${clamav_clamd_socket})!" exit 1 fi fi } start_postcmd() { + echo -n "Waiting for clamav-milter socket.. " + i=${clamav_milter_socktimeout} + while [ $i -ne 0 ] + do + [ -S "$clamav_milter_socket" ] && break + if [ `expr $i % 10` -eq 0 ]; then + echo -n "${i}.. " + fi + sleep 1 + i=$(($i-1)) + done + echo + if [ $i -eq 0 ]; then + echo "There is no clamav-milter socket (${clamav_clamd_socket})!" + exit 1 + fi /bin/chmod ${clamav_milter_socket_mode} ${clamav_milter_socket} } # read settings, set default values load_rc_config $name : ${clamav_milter_enable="NO"} : ${clamav_milter_socket="%%CLAMAV_MILTER_SOCKET%%"} : ${clamav_milter_flags="--postmaster-only --local --outgoing --timeout=0 --max-children=50"} : ${clamav_milter_socktimeout="60"} : ${clamav_milter_socket_mode="755"} : ${clamav_clamd_socket="%%CLAMAV_CLAMD_SOCKET%%"} : ${clamav_clamd_enable="NO"} run_rc_command "$1" Property changes on: head/security/clamav-devel/files/clamav-milter.in ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.5 \ No newline at end of property +1.6 \ No newline at end of property