Date: Sun, 24 Nov 2002 12:04:23 -0600 (CST) From: "Ryan T. Dean" <rtdean@cytherianage.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/45686: New port: security/clamav Clam AntiVirus, a free opensource AV toolkit Message-ID: <200211241804.gAOI4NTU086541@ratri.cytherianage.net>
next in thread | raw e-mail | index | archive | help
>Number: 45686 >Category: ports >Synopsis: New port: security/clamav Clam AntiVirus, a free opensource AV toolkit >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Nov 24 10:10:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Ryan T. Dean >Release: FreeBSD 4.7-STABLE i386 >Organization: >Environment: System: FreeBSD ratri.cytherianage.net 4.7-STABLE FreeBSD 4.7-STABLE #3: Mon Oct 21 22:53:06 CDT 2002 root@ratri.cytherianage.net:/usr/obj/usr/src/sys/TEMP-RATRI i386 >Description: Clam AntiVirus is an anti-virus toolkit for UNIX. The main purpose of this software is the integration with mail servers (attachment scanning). The package provides a flexible and scalable multi-threaded daemon, a command line scanner, and a tool for automatic updating via Internet. The programs are based on a shared library distributed with the Clam AntiVirus package, which you can use in your own software. Clam AV uses a virus database from OpenAntiVirus.org, we also help with signature generating. >How-To-Repeat: >Fix: Here is the shar archive of the new port... # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # clamav # clamav/Makefile # clamav/distinfo # clamav/pkg-comment # clamav/pkg-plist # clamav/files # clamav/files/freshclam.sh # clamav/files/patch-configure # clamav/pkg-descr # clamav/pkg-install # clamav/pkg-deinstall # echo c - clamav mkdir -p clamav > /dev/null 2>&1 echo x - clamav/Makefile sed 's/^X//' >clamav/Makefile << 'END-of-clamav/Makefile' X# New ports collection makefile for: security/clamav X# Date created: 24 November 2002 X# Whom: rtdean@cytherianage.net X# X# $FreeBSD$ X# X XPORTNAME= clamav XPORTVERSION= 0.54 XCATEGORIES= security XMASTER_SITES= http://clamav.elektrapro.com/stable/ X XMAINTAINER= rtdean@cytherianage.net X XHAS_CONFIGURE= yes XCONFIGURE_ARGS= --prefix=${PREFIX} \ X --build=${CONFIGURE_TARGET} \ X --with-user=nobody \ X --with-group=nobody X XMAN1= clamscan.1 freshclam.1 sigtool.1 clamdscan.1 XMAN5= clamav.conf.5 XMAN8= clamd.8 X Xpost-extract: X @${SED} -e "s#%%PREFIX%%#${PREFIX}#g" ${FILESDIR}/freshclam.sh \ X > ${WRKSRC}/freshclam.sh X Xpost-install: X @ ${INSTALL_SCRIPT} ${WRKSRC}/freshclam.sh ${PREFIX}/etc/rc.d/freshclam.sh X.if !defined(NOPORTDOCS) X @ ${MKDIR} ${PREFIX}/share/doc/clamav X @ ${INSTALL_DATA} ${WRKSRC}/docs/clamdoc.pdf ${PREFIX}/share/doc/clamav X.endif X @PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL X X.include <bsd.port.mk> END-of-clamav/Makefile echo x - clamav/distinfo sed 's/^X//' >clamav/distinfo << 'END-of-clamav/distinfo' XMD5 (clamav-0.54.tar.gz) = 1c2e2adffe9ed4d15fe2167dd7bad591 END-of-clamav/distinfo echo x - clamav/pkg-comment sed 's/^X//' >clamav/pkg-comment << 'END-of-clamav/pkg-comment' XClam AntiVirus is an opensource free AntiVirus program END-of-clamav/pkg-comment echo x - clamav/pkg-plist sed 's/^X//' >clamav/pkg-plist << 'END-of-clamav/pkg-plist' Xbin/clamscan Xbin/freshclam Xbin/sigtool Xbin/clamdscan Xetc/clamav.conf Xetc/rc.d/freshclam.sh Xinclude/clamav.h Xlib/libclamav.so.1 Xlib/libclamav.so Xlib/libclamav.la Xlib/libclamav.a Xsbin/clamd Xshare/clamav/viruses.db Xshare/clamav/viruses.db2 X@dirrm share/clamav X%%PORTDOCS%%share/doc/clamav/clamdoc.pdf X%%PORTDOCS%%@dirrm share/doc/clamav END-of-clamav/pkg-plist echo c - clamav/files mkdir -p clamav/files > /dev/null 2>&1 echo x - clamav/files/freshclam.sh sed 's/^X//' >clamav/files/freshclam.sh << 'END-of-clamav/files/freshclam.sh' X#!/bin/sh X# X# Automatically start FreshClam server X Xcase "$1" in X start) X %%PREFIX%%/bin/freshclam -d -c 2 -l /var/log/freshclam.log X echo -n ' freshclam' X ;; X stop) X /usr/bin/killall -TERM freshclam > /dev/null 2>&1 \ X && echo -n ' freshclam' X ;; X *) X echo "Usage: $0 { start | stop }" X exit 64 X ;; Xesac END-of-clamav/files/freshclam.sh echo x - clamav/files/patch-configure sed 's/^X//' >clamav/files/patch-configure << 'END-of-clamav/files/patch-configure' XIndex: configure X=================================================================== XRCS file: /root/tmp-cvs/clamav/configure,v Xretrieving revision 1.1.1.1 Xdiff -u -r1.1.1.1 configure X--- configure 23 Nov 2002 14:03:13 -0000 1.1.1.1 X+++ configure 23 Nov 2002 14:29:01 -0000 X@@ -8561,7 +8561,7 @@ X # config file X cfg_dir=`echo $sysconfdir | grep prefix` X if test -n "$cfg_dir"; then X- cfg_dir="$ac_default_prefix/etc" X+ cfg_dir="$prefix/etc" X else X cfg_dir="$sysconfdir" X fi END-of-clamav/files/patch-configure echo x - clamav/pkg-descr sed 's/^X//' >clamav/pkg-descr << 'END-of-clamav/pkg-descr' XClam AntiVirus is an anti-virus toolkit for UNIX. The main purpose of this Xsoftware is the integration with mail servers (attachment scanning). The package Xprovides a flexible and scalable multi-threaded daemon, a command line scanner, Xand a tool for automatic updating via Internet. The programs are based on a Xshared library distributed with the Clam AntiVirus package, which you can use in Xyour own software. Clam AV uses a virus database from OpenAntiVirus.org, we also Xhelp with signature generating. X XWWW: http://clamav.elektrapro.com END-of-clamav/pkg-descr echo x - clamav/pkg-install sed 's/^X//' >clamav/pkg-install << 'END-of-clamav/pkg-install' X#! /bin/sh X Xcase $2 in X XPOST-INSTALL) X echo "Checking logging..." X if [ -f /var/log/freshclam.log ]; then X echo " you have /var/log/freshclam.log! Good!" X else X echo " creating /var/log/freshclam.log!" X cat /dev/null > /var/log/freshclam.log X fi X X echo "Adding freshclam log entry to \"/etc/newsyslog.conf\"." X cat <<EOF >>/etc/newsyslog.conf X/var/log/freshclam.log 644 3 * \$W6D0 J XEOF X ;; Xesac END-of-clamav/pkg-install echo x - clamav/pkg-deinstall sed 's/^X//' >clamav/pkg-deinstall << 'END-of-clamav/pkg-deinstall' X#! /bin/sh X Xif [ x$2 != xDEINSTALL ]; then X exit Xfi X Xexport PATH=/bin:/usr/bin:/usr/sbin X Xecho -n "Killing running ClamAV programs:" XBINARIES="freshclam clamd" Xfor binary in ${BINARIES}; do X if ps -avc | grep -q ${binary}; then X killall -TERM ${binary} X echo -n " ${binary}" X sleep 2 X fi Xdone Xecho "." X Xecho "Removing freshclam log entry from \"/etc/newsyslog.conf\"" Xsed -i '' "/freshclam\.log/d" /etc/newsyslog.conf END-of-clamav/pkg-deinstall exit >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211241804.gAOI4NTU086541>