]>
Commit | Line | Data |
---|---|---|
2488ddd4 ER |
1 | # TODO |
2 | # - fix build with new apache/apr (apr_off_t) | |
98557b57 | 3 | %define apxs /usr/sbin/apxs |
4 | %define mod_name clamav | |
c95298f0 | 5 | Summary: An Apache virus scanning filter |
ac3d21b0 | 6 | Summary(pl.UTF-8): Filtr skanera antywirusowego dla Apache'a |
d418d050 | 7 | Name: apache-mod_%{mod_name} |
549a221a | 8 | Version: 0.21 |
2488ddd4 | 9 | Release: 0.1 |
d418d050 | 10 | License: GPL |
11 | Group: Networking/Daemons | |
12 | Source0: http://software.othello.ch/mod_clamav/mod_%{mod_name}-%{version}.tar.gz | |
549a221a | 13 | # Source0-md5: 98bd0d8628be8ddeae21da6623e57d20 |
d418d050 | 14 | Source1: %{name}.conf |
15 | Patch0: %{name}-libtool-tag.patch | |
16 | URL: http://software.othello.ch/mod_clamav/ | |
c6a566c4 | 17 | BuildRequires: apache-apxs >= 2.0 |
ecf6a5d2 | 18 | BuildRequires: apache-devel >= 2.0 |
2488ddd4 ER |
19 | BuildRequires: apr-devel >= 1:1.0 |
20 | BuildRequires: apr-util-devel >= 1:1.0 | |
c95298f0 JB |
21 | BuildRequires: autoconf |
22 | BuildRequires: automake | |
9c2e6dce | 23 | BuildRequires: clamav-devel |
0aa5d0e9 | 24 | BuildRequires: libtool |
774081d9 | 25 | BuildRequires: rpmbuild(macros) >= 1.268 |
2488ddd4 | 26 | Requires: apache(modules-api) = %apache_modules_api |
d418d050 | 27 | Requires: apache-mod_proxy |
28 | Requires: clamav | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
2488ddd4 ER |
31 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
32 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
d418d050 | 33 | |
34 | %description | |
35 | mod_clamav is an Apache 2 filter which scans the content delivered by | |
36 | the proxy module (mod_proxy) for viruses using the Clamav virus | |
37 | scanning engine. | |
38 | ||
9074edcb JR |
39 | %description -l pl.UTF-8 |
40 | mod_clamav to filtr dla serwera Apache 2 skanujący treści dostarczane | |
41 | przez moduł proxy (mod_proxy) pod kątem wirusów przy użyciu silnika | |
c95298f0 JB |
42 | skanera antywirusowego Clamav. |
43 | ||
d418d050 | 44 | %prep |
45 | %setup -q -n mod_%{mod_name}-%{version} | |
46 | %patch0 -p0 | |
47 | ||
48 | %build | |
0aa5d0e9 | 49 | %{__libtoolize} |
d418d050 | 50 | %{__aclocal} |
51 | %{__autoconf} | |
52 | %{__automake} | |
53 | ||
2488ddd4 | 54 | CPPFLAGS="-I `/usr/bin/apr-1-config --includedir` -I `/usr/bin/apu-1-config --includedir`" |
d418d050 | 55 | %configure \ |
98557b57 | 56 | --with-apxs=%{apxs} |
d418d050 | 57 | %{__make} |
58 | ||
59 | %install | |
60 | rm -rf $RPM_BUILD_ROOT | |
d418d050 | 61 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf} |
c95298f0 | 62 | |
0aa5d0e9 | 63 | install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so |
2488ddd4 | 64 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/32_mod_clamav.conf |
d418d050 | 65 | |
66 | %clean | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
69 | %post | |
774081d9 | 70 | %service -q httpd restart |
d418d050 | 71 | |
fd959990 | 72 | %postun |
d418d050 | 73 | if [ "$1" = "0" ]; then |
774081d9 | 74 | %service -q httpd restart |
d418d050 | 75 | fi |
76 | ||
77 | %files | |
78 | %defattr(644,root,root,755) | |
ecf6a5d2 | 79 | %doc AUTHORS ChangeLog mod_clamav.html NEWS README TODO |
2488ddd4 | 80 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf |
4a9bbba3 | 81 | %attr(755,root,root) %{_pkglibdir}/*.so |