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
12 Patch0: %{name}-libtool-tag.patch
13 URL: http://software.othello.ch/mod_clamav/
14 BuildRequires: %{apxs}
15 BuildRequires: apache-devel >= 2.0
16 BuildRequires: apr-devel
17 BuildRequires: apr-util-devel
18 BuildRequires: autoconf
19 BuildRequires: automake
21 Requires: apache-mod_proxy
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define _pkglibdir %(%{apxs} -q LIBEXECDIR)
26 %define _sysconfdir /etc/httpd
27 %define _libexecdir %{_libdir}/apache
30 mod_clamav is an Apache 2 filter which scans the content delivered by
31 the proxy module (mod_proxy) for viruses using the Clamav virus
35 mod_clamav to filtr dla serwera Apache 2 skanuj±cy tre¶ci dostarczane
36 przez modu³ proxy (mod_proxy) pod k±tem wirusów przy u¿yciu silnika
37 skanera antywirusowego Clamav.
40 %setup -q -n mod_%{mod_name}-%{version}
48 CPPFLAGS="-I `/usr/bin/apr-config --includedir` -I `/usr/bin/apu-config --includedir`"
57 rm -rf $RPM_BUILD_ROOT
58 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
60 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
62 CFG="$RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf"
63 install %{SOURCE1} ${CFG}/32_mod_clamav.conf
66 rm -rf $RPM_BUILD_ROOT
69 if [ -f /var/lock/subsys/httpd ]; then
70 /etc/rc.d/init.d/httpd restart 1>&2
72 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
76 if [ "$1" = "0" ]; then
77 if [ -f /var/lock/subsys/httpd ]; then
78 /etc/rc.d/init.d/httpd restart 1>&2
83 %defattr(644,root,root,755)
84 %doc AUTHORS ChangeLog mod_clamav.html NEWS README TODO
85 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd.conf/32_mod_clamav.conf
86 %attr(755,root,root) %{_libexecdir}/mod_%{mod_name}.so