Package: clamav Version: 0.83 Revision: 1 Description: Clam Anti-Virus scanner DescDetail: << Clam AntiVirus is an anti-virus scanner written from scratch. It is licensed under GNU GPL2 and uses the virus database from OpenAntiVirus, which is an another free anti-virus project. In contrast to the OpenAntiVirus which is written in Java, Clam AntiVirus is written entirely in C and is POSIX compliant. << DescUsage: << 'clamscan' scans the current working directory for known viruses. See 'man clamscan' for details. For virus updates, run 'freshclam' from a shell prompt or in a cron script. << SplitOff: << Description: Shared libraries for ClamAV Package: %N-shlibs Depends: bzip2-shlibs, gmp-shlibs, openssl097-shlibs, curl-ssl-shlibs, dlcompat-shlibs InstallScript: << /usr/bin/install -d -m 755 %i/lib /bin/mv %I/lib/libclamav.1*.dylib %i/lib << Shlibs: << %p/lib/libclamav.1.dylib 2.0.0 %n (>= 0.80-1) << << SplitOff2: << Description: ClamAV daemon DescDetail: << Installs and runs the ClamAV daemon using the daemonic package. << DescUsage: << In order to use the clamd daemon, you need to call 'clamdscan' (note the d in contrast to the standard 'clamscan' command). You might want to edit %p/etc/clamd.conf to suit your needs. Additionally, enable 'NotifyClamd' in %p/etc/freshclam.conf such that the ClamAV daemon gets notified about virus definition updates. << Package: %N-daemon Depends: %N, daemonic Files: << etc/clamd.conf bin/clamdscan sbin/clamd << ConfFiles: %p/etc/clamd.conf DaemonicName: clamav DaemonicFile: << ClamAV ClamAV anti-virus daemon %p/sbin/clamd %p/etc/clamd.conf %p/var/run/clamd.pid << PostInstScript: << daemonic enable clamav /Library/StartupItems/daemonic-clamav/daemonic-clamav start << PreRmScript: << if [ $1 != "upgrade" ]; then daemonic remove clamav fi << << SplitOff3: << Description: Developer files for ClamAV Package: %N-dev Depends: %N (=%v-%r), pkgconfig BuildDependsOnly: true InstallScript: << /bin/mv %I/include %I/lib %i << Files: bin/clamav-config << Source: mirror:sourceforge:%n/%n-%v.tar.gz Source-MD5: e3a1b6bbda8095c5aae4eb7bc753804c BuildDepends: gmp, bzip2, bzip2-dev, openssl097-dev, curl-ssl, curl-ssl-dev, dlcompat-dev Depends: %N-shlibs (=%v-%r), passwd (>= 20030202-2), unrar NoSetLDFLAGS: true SetLIBS: -L%p/lib ConfigureParams: --mandir=%p/share/man --with-dbdir=%p/var/db/%n --sysconfdir=%p/etc InstallScript: << #!/bin/sh /usr/sbin/chown -R root:admin * /usr/bin/make install DESTDIR=%d for configfile in clamd.conf freshclam.conf ; do /usr/bin/sed 's/^Example/#Example/' etc/$configfile > %i/etc/$configfile done /usr/sbin/chown -R clamav:admin %i/var/db/%n /bin/chmod g+w %i/var/db/%n /usr/bin/install -d -m 755 %i/share/doc/%n /bin/mv docs/* %i/share/doc/%n (cd %i/share/doc/%n; /bin/rm -R Makefile Makefile.am Makefile.in man) /usr/bin/install -d -m 755 %i/share/doc/%n/test/ /bin/cp -r test/* %i/share/doc/%n/test/ #Remove CVS directories /usr/bin/find %i -name "CVS" -type d -depth -exec rm -rf \{\} \; # run tests echo; echo "*** TESTING %n:"; %b/clamscan/clamscan --unrar --database=%b/database %b/test/clam-error.rar; result1="$?"; echo "test result 1: ${result1}"; echo "Done test 1"; echo; %b/clamscan/clamscan --database=%b/database %b/test/clam.rar; result2="$?"; echo "test result 2: ${result2}"; echo "Done test 2"; echo; %b/clamscan/clamscan --database=%b/database %b/test/clam.exe; result3="$?"; echo "test result 3: ${result3}"; echo "Done test 3"; echo; %b/clamscan/clamscan --database=%b/database %b/test/clam.exe.bz2; result4="$?"; echo "test result 4: ${result4}"; echo "Done test 4"; echo; %b/clamscan/clamscan --database=%b/database %b/test/clam.zip; result5="$?"; echo "test result 5: ${result5}"; echo "Done test 5"; echo; %b/clamscan/clamscan --database=%b/database %b/test/clam.cab; result6="$?"; echo "test result 6: ${result6}"; echo "Done test 6"; echo; if [ $result1 == "1" ] && [ $result2 == "1" ] && [ $result3 == "1" ] && [ $result4 == "1" ] && [ $result5 == "1" ] && [ $result6 == "1" ]; then echo "virus scan tests passed!" ; exit 0; else echo "*** virus scan tests failed! ***" ; exit 1; fi << PreInstScript: << #!/bin/sh # Remove old virus databases which are not removed by previous clamav packages if [ -f %p/var/db/%n/viruses.db ]; then echo "Removing old virus definitions %p/var/db/clamav/viruses.db" rm -f %p/var/db/%n/viruses.db fi if [ -f %p/var/db/%n/viruses.db2 ]; then echo "Removing old virus definitions %p/var/db/clamav/viruses.db2" rm -f %p/var/db/%n/viruses.db2 fi if [ -d %p/share/%n ]; then echo "Removing old virus definitions directory %p/share/%n" rm -r %p/share/%n fi << PostInstScript: << #!/bin/bash # need to change permissions here as these files might already been # installed, in which case the permission are not adjusted /usr/sbin/chown -R clamav:admin %p/var/db/clamav /bin/chmod g+w %p/var/db/clamav /bin/chmod g+w %p/etc/freshclam.conf printf "\nDo you want to download the latest virus definitions now? [Yn] " YN=yes if ! read -t 20 YN; then echo "Yes" fi case $YN in [nN]|[nN][oO]) echo "Your virus definitions might be out-dated." ;; *) set +e ; %p/bin/freshclam ;; esac printf "\nTo download the latest virus definitions in future, run 'freshclam'.\n" << ConfFiles: %p/etc/freshclam.conf DocFiles: AUTHORS BUGS COPYING ChangeLog FAQ NEWS README TODO Maintainer: Remi Mommsen Homepage: http://www.clamav.net/ License: Restrictive DescPackaging: << Although this package has a GPL license, it is marked Restrictive since it links to openssl. clamscan requires a user named 'clamav' to run in superuser mode regardless of how it was built. (Important when running the post-build tests because fink runs as root). During the test the virus database isn't actually installed yet so the one in the build directory is specified. Original package maintainer was Carsten Klapp . << DescPort: << Install virus databases into %p/var/db/clamav instead of default %p/share/clamav; %p/share is for static data. <<