1 %define apxs /usr/sbin/apxs
2 %define mod_name clamav
3 Summary: An Apache virus scanning filter
4 Summary(pl): Filtr skanera antywirusowego dla Apache'a
5 Name: apache-mod_%{mod_name}
9 Group: Networking/Daemons
10 Source0: http://software.othello.ch/mod_clamav/mod_%{mod_name}-%{version}.tar.gz
11 # Source0-md5: 98bd0d8628be8ddeae21da6623e57d20
13 Patch0: %{name}-libtool-tag.patch
14 URL: http://software.othello.ch/mod_clamav/
15 BuildRequires: %{apxs}
16 BuildRequires: apache-devel >= 2.0
17 BuildRequires: apr-devel
18 BuildRequires: apr-util-devel
19 BuildRequires: autoconf
20 BuildRequires: automake
21 BuildRequires: clamav-devel
22 BuildRequires: libtool
24 Requires: apache-mod_proxy
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 %define _pkglibdir %(%{apxs} -q LIBEXECDIR)
29 %define _sysconfdir %(%{apxs} -q SYSCONFDIR)
30 %define _libexecdir %{_libdir}/apache
33 mod_clamav is an Apache 2 filter which scans the content delivered by
34 the proxy module (mod_proxy) for viruses using the Clamav virus
38 mod_clamav to filtr dla serwera Apache 2 skanuj±cy tre¶ci dostarczane
39 przez modu³ proxy (mod_proxy) pod k±tem wirusów przy u¿yciu silnika
40 skanera antywirusowego Clamav.
43 %setup -q -n mod_%{mod_name}-%{version}
46 %{__perl} -pi -e 's/(-module)/$1 -avoid-version/' Makefile.am
54 CPPFLAGS="-I `/usr/bin/apr-config --includedir` -I `/usr/bin/apu-config --includedir`"
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
64 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
66 CFG="$RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf"
67 install %{SOURCE1} ${CFG}/32_mod_clamav.conf
70 rm -rf $RPM_BUILD_ROOT
73 if [ -f /var/lock/subsys/httpd ]; then
74 /etc/rc.d/init.d/httpd restart 1>&2
76 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
80 if [ "$1" = "0" ]; then
81 if [ -f /var/lock/subsys/httpd ]; then
82 /etc/rc.d/init.d/httpd restart 1>&2
87 %defattr(644,root,root,755)
88 %doc AUTHORS ChangeLog mod_clamav.html NEWS README TODO
89 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd.conf/32_mod_clamav.conf
90 %attr(755,root,root) %{_libexecdir}/mod_%{mod_name}.so