#Module-Specific definitions %define mod_name mod_clamav %define mod_conf 86_%{mod_name}.conf %define mod_so %{mod_name}.so Summary: Clam virus scanning filter DSO for apache Name: apache-%{mod_name} Version: 0.22 Release: %mkrel 4 Group: System/Servers License: GPL URL: http://software.othello.ch/mod_clamav/ Source0: http://software.othello.ch/mod_clamav/%{mod_name}-%{version}.tar.gz Source1: %{mod_conf} Patch0: mod_clamav-0.21-apache220.diff Requires: clamd Requires: clamav Requires: clamav-db BuildRequires: clamav-devel BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: gmp-devel Requires(pre): rpm-helper Requires(postun): rpm-helper Requires(pre): apache-conf >= 2.2.0 Requires(pre): apache >= 2.2.0 Requires: apache-conf >= 2.2.0 Requires: apache >= 2.2.0 BuildRequires: apache-devel >= 2.2.0 BuildRequires: file Epoch: 1 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description %{mod_name} is an apache 2 filter module to allow virus checking of all HTTP all reply data. By adding the filter to the Proxy location, all requests mediated by an apache proxy can be scanned for viruses. %prep %setup -q -n %{mod_name}-%{version} %patch0 -p0 cp %{SOURCE1} %{mod_conf} # strip away annoying ^M find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//' find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//' %build # not used with make %configure2_5x --localstatedir=/var/lib --with-apxs=%{_sbindir}/apxs #%{_sbindir}/apxs -DCLAMAV_DEBUG=\"1\" -c %{mod_name}.c -Wl,-lclamav -lbz2 -lz -lpthread -lgmp %{_sbindir}/apxs -c %{mod_name}.c -Wl,-lclamav -lbz2 -lz -lpthread -lgmp %install rm -rf %{buildroot} install -d %{buildroot}%{_libdir}/apache-extramodules install -d %{buildroot}%{_sysconfdir}/httpd/modules.d install -d %{buildroot}/var/spool/%{mod_name} install -m0755 .libs/*.so %{buildroot}%{_libdir}/apache-extramodules/ install -m0644 %{mod_conf} %{buildroot}%{_sysconfdir}/httpd/modules.d/%{mod_conf} %post if [ -f %{_var}/lock/subsys/httpd ]; then %{_initrddir}/httpd restart 1>&2; fi %postun if [ "$1" = "0" ]; then if [ -f %{_var}/lock/subsys/httpd ]; then %{_initrddir}/httpd restart 1>&2 fi fi %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc AUTHORS ChangeLog README TODO mod_clamav.html %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/httpd/modules.d/%{mod_conf} %attr(0755,root,root) %{_libdir}/apache-extramodules/%{mod_so} %attr(0755,apache,apache) %dir /var/spool/%{mod_name} %changelog * Thu Sep 04 2008 Oden Eriksson <oeriksson@mandriva.com> 1:0.22-4mdv2009.0 + Revision: 280479 - rebuild against new clamav libs * Mon Jul 14 2008 Oden Eriksson <oeriksson@mandriva.com> 1:0.22-3mdv2009.0 + Revision: 234883 - rebuild * Thu Jun 05 2008 Oden Eriksson <oeriksson@mandriva.com> 1:0.22-2mdv2009.0 + Revision: 215560 - fix rebuild - hard code %%{_localstatedir}/lib to ease backports * Sat May 10 2008 Oden Eriksson <oeriksson@mandriva.com> 1:0.22-1mdv2009.0 + Revision: 205381 - 0.22 * Thu Apr 17 2008 Oden Eriksson <oeriksson@mandriva.com> 1:0.21-10mdv2009.0 + Revision: 195366 - rebuilt against clamav-0.93 libs * Sat Mar 08 2008 Oden Eriksson <oeriksson@mandriva.com> 1:0.21-9mdv2008.1 + Revision: 182262 - rebuild * Sun Feb 17 2008 Michael Scherer <misc@mandriva.org> 1:0.21-8mdv2008.1 + Revision: 169869 - rebuild for new clamav + Olivier Blin <oblin@mandriva.com> - restore BuildRoot + Thierry Vignaud <tvignaud@mandriva.com> - kill re-definition of %%buildroot on Pixel's request * Sat Sep 08 2007 Oden Eriksson <oeriksson@mandriva.com> 1:0.21-7mdv2008.0 + Revision: 82548 - rebuild * Sat Mar 10 2007 Oden Eriksson <oeriksson@mandriva.com> 0.21-6mdv2007.1 + Revision: 140659 - rebuild * Sat Mar 10 2007 Oden Eriksson <oeriksson@mandriva.com> 1:0.21-5mdv2007.1 + Revision: 140504 - added a patch for clamav-0.90 * Sun Mar 04 2007 Emmanuel Andry <eandry@mandriva.org> 1:0.21-4mdv2007.1 + Revision: 131927 - rebuild for new libclamav * Thu Nov 09 2006 Oden Eriksson <oeriksson@mandriva.com> 1:0.21-3mdv2007.0 + Revision: 79392 - Import apache-mod_clamav * Mon Aug 07 2006 Oden Eriksson <oeriksson@mandriva.com> 1:0.21-3mdv2007.0 - rebuild * Wed Dec 14 2005 Oden Eriksson <oeriksson@mandriva.com> 1:0.21-2mdk - rebuilt against apache-2.2.0 * Mon Nov 28 2005 Oden Eriksson <oeriksson@mandriva.com> 1:0.21-1mdk - fix versioning * Sun Jul 31 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_0.21-2mdk - fix deps * Fri Jun 03 2005 Oden Eriksson <oeriksson@mandriva.com> 2.0.54_0.21-1mdk - rename the package - the conf.d directory is renamed to modules.d - use new rpm-4.4.x pre,post magic * Sun Mar 20 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_0.21-4mdk - use the %%mkrel 1 * Mon Feb 28 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_0.21-3mdk - fix %%post and %%postun to prevent double restarts - fix bug #6574 * Wed Feb 16 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_0.21-2mdk - spec file cleanups, remove the ADVX-build stuff * Tue Feb 08 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.53_0.21-1mdk - rebuilt for apache 2.0.53 * Tue Oct 19 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.52_0.21-2mdk - rebuilt against latest clamav libs * Wed Sep 29 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.52_0.21-1mdk - built for apache 2.0.52 * Fri Sep 17 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.51_0.21-1mdk - built for apache 2.0.51 * Tue Jul 13 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 2.0.50_0.21-1mdk - built for apache 2.0.50 - remove redundant provides * Tue Jun 15 2004 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.0.49_0.21-1mdk - 0.21 - built for apache 2.0.49 * Tue Mar 23 2004 Michael Scherer <misc@mandrake.org> 2.0.48_0.19-1mdk - 0.19 * Fri Mar 19 2004 Michael Scherer <misc@mandrake.org> 2.0.48_0.18-1mdk - 0.18 - added testing instruction in configuration file