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