-# $Revision: 1.3 $
%define apxs /usr/sbin/apxs
%define mod_name clamav
Summary: An Apache virus scanning filter
Summary(pl): Filtr skanera antywirusowego dla Apache'a
Name: apache-mod_%{mod_name}
-Version: 0.12
+Version: 0.21
Release: 1
License: GPL
Group: Networking/Daemons
Source0: http://software.othello.ch/mod_clamav/mod_%{mod_name}-%{version}.tar.gz
+# Source0-md5: 98bd0d8628be8ddeae21da6623e57d20
Source1: %{name}.conf
Patch0: %{name}-libtool-tag.patch
URL: http://software.othello.ch/mod_clamav/
BuildRequires: %{apxs}
-BuildRequires: apache-devel
+BuildRequires: apache-devel >= 2.0
BuildRequires: apr-devel
BuildRequires: apr-util-devel
BuildRequires: autoconf
BuildRequires: automake
+BuildRequires: clamav-devel
+BuildRequires: libtool
Requires: apache >= 2
Requires: apache-mod_proxy
Requires: clamav
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _pkglibdir %(%{apxs} -q LIBEXECDIR)
-%define _sysconfdir /etc/httpd
+%define _sysconfdir %(%{apxs} -q SYSCONFDIR)
%define _libexecdir %{_libdir}/apache
%description
%setup -q -n mod_%{mod_name}-%{version}
%patch0 -p0
+%{__perl} -pi -e 's/(-module)/$1 -avoid-version/' Makefile.am
+
%build
+%{__libtoolize}
%{__aclocal}
%{__autoconf}
%{__automake}
CPPFLAGS="-I `/usr/bin/apr-config --includedir` -I `/usr/bin/apu-config --includedir`"
-export CPPFLAGS
-
%configure \
--with-apxs=%{apxs}
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
-install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
CFG="$RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf"
install %{SOURCE1} ${CFG}/32_mod_clamav.conf
if [ -f /var/lock/subsys/httpd ]; then
/etc/rc.d/init.d/httpd restart 1>&2
else
- echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
+ echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
fi
%preun
%files
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog COPYING INSTALL mod_clamav.html NEWS README TODO
+%doc AUTHORS ChangeLog mod_clamav.html NEWS README TODO
%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd.conf/32_mod_clamav.conf
%attr(755,root,root) %{_libexecdir}/mod_%{mod_name}.so