# --with art will disable milter, and enable atomic psa %define with_art %{?_with_art:1}%{!?_with_art:0} %define _without_milter 1 # Conditional build (--with/--without option) # --without milter %define lgwver 0.23 Summary: An antivirus toolkit for Unix Name: clamav Version: 0.85 Release: 1 Epoch: 45 License: GPL Group: Applications/System URL: http://www.clamav.net/ Source0: http://download.sf.net/clamav/%{name}-%{version}.tar.gz Source1: clamd.sh Source2: clamav-milter.sh Source3: freshclam.sh Source4: clamav-milter.sysconfig Source5: clamd.logrotate Source6: freshclam.logrotate Source7: http://www.schimkat.dk/clamav/clamav-logwatch-%{lgwver}.tar.gz Source8: RPM-clamav.txt Source9: RPM-clamav-milter.txt Source10: clamav-milter.daily Patch0: clamd-conf.patch Patch1: freshclam-conf.patch Patch2: clamav-0.65-rh73.patch #Patch3: gamera-conf.patch #Patch4: art-conf.patch Requires: bzip2-libs gmp zlib BuildRequires: bzip2-devel gmp-devel zlib-devel BuildRequires: autoconf automake BuildRoot: %{_tmppath}/%{name}-%{version}-root %if %{with_art} Obsoletes: clamav-database Obsoletes: clamav-static Obsoletes: clamav-libs Requires: qmail %else Requires: qmail sharutils %endif %description Clam AntiVirus is a GPL 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 package, which you can use with your own software. Most importantly, the virus database is kept up to date . %if %{!?_without_milter:1}%{?_without_milter:0} %package milter Summary: Clamav milter Group: System Environment/Daemons License: GPL Requires: %{name} = %{epoch}:%{version}-%{release} Requires: sendmail >= 8.11 Requires: sendmail-cf >= 8.11 BuildRequires: sendmail-devel >= 8.11 %description milter ClamAV sendmail filter using MILTER interface. %endif %package devel Summary: Clamav - Development header files and libraries Group: Development/Libraries Requires: %{name} = %{epoch}:%{version}-%{release} %description devel This package contains the development header files and libraries necessary to develope your own clamav based applications. %prep %setup -q %setup -q -D -a 7 ## breaks ##%patch1 -p1 -b .fc1 ## RH-7.3 workaround ##%patch2 -p1 -b .rh73 # %if %{with_art} %patch0 -p0 %patch1 -p0 %else %patch0 -p0 %patch1 -p0 %endif %build %configure \ --enable-debug \ --program-prefix=%{?_program_prefix} \ %{!?_without_milter:--enable-milter} \ --enable-id-check \ --disable-clamav \ --disable-zlib-vcheck \ --with-user=clamav \ --with-group=clamav \ --with-dbdir=%{_localstatedir}/lib/clamav %{__make} %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{_initrddir}/ install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ install -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/ install -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ #install -d $RPM_BUILD_ROOT%{_sysconfdir}/log.d/scripts/services/ #install -d $RPM_BUILD_ROOT%{_sysconfdir}/log.d/conf/services/ install -d $RPM_BUILD_ROOT%{_localstatedir}/lib/clamav/ install -d $RPM_BUILD_ROOT%{_localstatedir}/log/clamav/ install -d $RPM_BUILD_ROOT%{_localstatedir}/run/clamav/ install -d $RPM_BUILD_ROOT%{_localstatedir}/spool/clamav/ %{__make} DESTDIR=$RPM_BUILD_ROOT install %{?_without_milter:rm -f $RPM_BUILD_ROOT%{_mandir}/man8/clamav-milter.8*} install %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/clamd install %{SOURCE3} $RPM_BUILD_ROOT%{_initrddir}/freshclam install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/clamd install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/freshclam #install clamav-logwatch-%{lgwver}/clamav $RPM_BUILD_ROOT%{_sysconfdir}/log.d/scripts/services/clamav #install clamav-logwatch-%{lgwver}/clamav.conf $RPM_BUILD_ROOT%{_sysconfdir}/log.d/conf/services/clamav.conf install etc/clamd.conf $RPM_BUILD_ROOT%{_sysconfdir}/clamd.conf install etc/freshclam.conf $RPM_BUILD_ROOT%{_sysconfdir}/freshclam.conf install %{SOURCE8} RPM-clamav.txt mv clamav-logwatch-%{lgwver}/HOWTO HOWTO-logwatch.txt # Milter %if %{!?_without_milter:1}%{?_without_milter:0} install %{SOURCE2} $RPM_BUILD_ROOT%{_initrddir}/clamav-milter install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/clamav-milter #install clamav-logwatch-%{lgwver}/clamav-milter $RPM_BUILD_ROOT%{_sysconfdir}/log.d/scripts/services/clamav-milter #install clamav-logwatch-%{lgwver}/clamav-milter.conf $RPM_BUILD_ROOT%{_sysconfdir}/log.d/conf/services/clamav-milter.conf install %{SOURCE9} RPM-clamav-milter.txt install %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/clamav-milter %endif # %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %pre if [ -z "`id -g clamav 2>/dev/null`" ]; then /usr/sbin/groupadd -g 46 -r -f clamav fi if [ -z "`id -u clamav 2>/dev/null`" ]; then /usr/sbin/useradd -u 46 -r -d /tmp -s /sbin/nologin -c "Clam AV Checker" -g clamav clamav 1>&2 fi %post /sbin/chkconfig --add clamd /sbin/chkconfig --add freshclam /sbin/chkconfig --level 3 clamd on /sbin/chkconfig --level 3 freshclam on service clamd start > /dev/null 2>&1 service freshclam start > /dev/null 2>&1 %preun if [ $1 = 0 ]; then service clamd stop > /dev/null 2>&1 service freshclam stop > /dev/null 2>&1 /sbin/chkconfig --del clamd /sbin/chkconfig --del freshclam fi %postun if [ $1 = 0 ]; then rm -rf %{_localstatedir}/run/clamav/ /usr/sbin/userdel -r clamav > /dev/null 2>&1 || : else service clamd condrestart > /dev/null 2>&1 service freshclam condrestart > /dev/null 2>&1 fi # Milter %if %{!?_without_milter:1}%{?_without_milter:0} %post milter /sbin/chkconfig --add clamav-milter %preun milter if [ $1 = 0 ]; then service clamav-milter stop > /dev/null 2>&1 /sbin/chkconfig --del clamav-milter fi %postun milter if [ "$1" -ge "1" ]; then service clamav-milter condrestart > /dev/null 2>&1 fi %endif # %files %defattr(0644,root,root,0755) %doc AUTHORS BUGS COPYING ChangeLog FAQ INSTALL NEWS README TODO %doc docs/*.pdf docs/html/ test/ RPM-clamav.txt HOWTO-logwatch.txt %attr(0644,root,clamav) %config(noreplace) %{_sysconfdir}/clamd.conf %attr(0640,root,clamav) %config(noreplace) %{_sysconfdir}/freshclam.conf %attr(0644,root,root) %{_sysconfdir}/logrotate.d/clamd %attr(0644,root,root) %{_sysconfdir}/logrotate.d/freshclam #%attr(0755,root,root) %{_sysconfdir}/log.d/scripts/services/clamav #%attr(0644,root,root) %{_sysconfdir}/log.d/conf/services/clamav.conf %attr(0755,root,root) %{_initrddir}/clamd %attr(0755,root,root) %{_initrddir}/freshclam %attr(0755,root,root) %{_bindir}/* %attr(0755,root,root) %{_sbindir}/clamd %attr(0755,root,root) %{_libdir}/libclamav.so.* %attr(0755,root,root) %{_libdir}/pkgconfig/libclamav.pc %attr(0755,clamav,clamav) %dir %{_localstatedir}/lib/clamav/ %attr(0644,clamav,clamav) %config(noreplace) %verify(user group mode) %{_localstatedir}/lib/clamav/main.cvd %attr(0644,clamav,clamav) %config(noreplace) %verify(user group mode) %{_localstatedir}/lib/clamav/daily.cvd %attr(0755,clamav,clamav) %{_localstatedir}/log/clamav/ %if %{with_art} %attr(0755,qmailq,clamav) %{_localstatedir}/run/clamav/ %else %attr(0755,clamav,clamav) %{_localstatedir}/run/clamav/ %endif %{_mandir}/man1/clamdscan.1* %{_mandir}/man1/clamscan.1* %{_mandir}/man1/freshclam.1* %{_mandir}/man1/sigtool.1* %{_mandir}/man5/clamd.conf.5* %{_mandir}/man5/freshclam.conf.5* %{_mandir}/man8/clamd.8* # Milter %if %{!?_without_milter:1}%{?_without_milter:0} %files milter %defattr(0644,root,root,0755) %doc RPM-clamav-milter.txt %config(noreplace) %{_sysconfdir}/sysconfig/clamav-milter %attr(0755,root,root) %{_initrddir}/clamav-milter %attr(0755,root,root) %{_sysconfdir}/cron.daily/clamav-milter #%attr(0755,root,root) %{_sysconfdir}/log.d/scripts/services/clamav-milter #%attr(0644,root,root) %{_sysconfdir}/log.d/conf/services/clamav-milter.conf %attr(0755,root,root) %{_sbindir}/clamav-milter %{_mandir}/man8/clamav-milter.8* %attr(0755,clamav,clamav) %{_localstatedir}/spool/clamav/ %endif # %files devel %defattr(0644,root,root,0755) %attr(0755,root,root) %{_libdir}/*.a %attr(0755,root,root) %{_libdir}/*.la %attr(0644,root,root) %{_includedir}/*.h %changelog * Sun May 14 2005 Scott R. Shinn 0.85 - update to 0.85 * Sun May 1 2005 Scott R. Shinn 0.84-1 - updade to 0.84 * Mon Feb 21 2005 Scott R. Shinn 0.83 - updates to 0.83 * Tue Feb 8 2005 Scott R. Shinn 0.82 - updates to 0.82 * Mon Nov 29 2004 Scott R. Shinn 0.80-2 - updates to final release - bugfixes w/ logwatch * Fri Sep 24 2004 Scott R. SHinn 0.80rc2-1 - DAR conversions - 0.80rc2 update * Sun Jun 06 2004 Scott R. Shinn - updates to 0.72 * Sun Mar 21 2004 Scott R. Shinn - updated to 0.70 - bugfix for gamera * Sat Mar 06 2004 Scott R. Shinn - set gamera builds to disable clamuko, and use big-stacks - added in sharutils Require * Thu Feb 26 2004 Scott R. Shinn - added in project gamera tweaks - added in PSA tweaks * Mon Feb 16 2004 Petr Krištof - Update to 0.67 - No replace config files by James Genus Jr. * Wed Feb 11 2004 Petr Krištof - Update to clamav 0.66 - Update to clamav-logwatch 0.23 - Use TCPsocket instead LOCALsocket - Replace /etc/sysconfig/freshclam with /etc/freshclam.conf - Fixed dependencies by Michal Jaegermann - Add clamav-milter.daily to cleanup quarantine spool - Add test/* suite to %doc by Peter A. Gomez * Sun Dec 7 2003 Petr Krištof - Fix Epoch dependencies by Eduardo Kaftanski * Sun Nov 23 2003 Petr Krištof - Update .spec file - Fix RH-7.3 program-prefix by Kenneth Porter - Rebuild on FC-1 * Sun Nov 16 2003 Petr Krištof - Fix doc errors - Fix dependencies - Patch for RH-7.3 by Lionel Bouton - Patch for RH-7.3 by Chris de Vidal - Option --without-milter by Ján Ondrej (SAL) * Wed Nov 12 2003 Petr Krištof - Removed package db - Added LogWatch support - Added FreshClam support - Moved logfiles to own subdirectory - Update to 0.65 * Wed Sep 10 2003 Petr Krištof - Option for build without clamavdb * Thu Jul 10 2003 Petr Krištof - Split package to clamav, db, milter, devel * Sun Jun 22 2003 Petr Krištof - Update to 0.60 * Tue Jun 10 2003 Petr Krištof - Fixed post, preun, postun scripts - Update to 2003xxxx snapshots * Tue Feb 4 2003 Petr Krištof - Rebuild on RH-8.0 * Sun Dec 1 2002 Petr Krištof - Based on PLD package - Initial RH-7.3 build