]> git.pld-linux.org Git - packages/apache-mod_clamav.git/blob - apache-mod_clamav.spec
8601e9f388ffb2da6b328c8be0b0976f3f6e34da
[packages/apache-mod_clamav.git] / apache-mod_clamav.spec
1 # TODO
2 # - fix build with new apache/apr (apr_off_t)
3 %define         apxs            /usr/sbin/apxs
4 %define         mod_name        clamav
5 Summary:        An Apache virus scanning filter
6 Summary(pl):    Filtr skanera antywirusowego dla Apache'a
7 Name:           apache-mod_%{mod_name}
8 Version:        0.21
9 Release:        0.1
10 License:        GPL
11 Group:          Networking/Daemons
12 Source0:        http://software.othello.ch/mod_clamav/mod_%{mod_name}-%{version}.tar.gz
13 # Source0-md5:  98bd0d8628be8ddeae21da6623e57d20
14 Source1:        %{name}.conf
15 Patch0:         %{name}-libtool-tag.patch
16 URL:            http://software.othello.ch/mod_clamav/
17 BuildRequires:  %{apxs}
18 BuildRequires:  apache-devel >= 2.0
19 BuildRequires:  apr-devel >= 1:1.0
20 BuildRequires:  apr-util-devel >= 1:1.0
21 BuildRequires:  autoconf
22 BuildRequires:  automake
23 BuildRequires:  clamav-devel
24 BuildRequires:  libtool
25 Requires:       apache(modules-api) = %apache_modules_api
26 Requires:       apache-mod_proxy
27 Requires:       clamav
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
31 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
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
38 %description -l pl
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
41 skanera antywirusowego Clamav.
42
43 %prep
44 %setup -q -n mod_%{mod_name}-%{version}
45 %patch0 -p0
46
47 %build
48 %{__libtoolize}
49 %{__aclocal}
50 %{__autoconf}
51 %{__automake}
52
53 CPPFLAGS="-I `/usr/bin/apr-1-config --includedir` -I `/usr/bin/apu-1-config --includedir`"
54 %configure \
55         --with-apxs=%{apxs}
56 %{__make}
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
61
62 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
63 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/32_mod_clamav.conf
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %post
69 if [ -f /var/lock/subsys/httpd ]; then
70         /etc/rc.d/init.d/httpd restart 1>&2
71 fi
72
73 %preun
74 if [ "$1" = "0" ]; then
75         if [ -f /var/lock/subsys/httpd ]; then
76                 /etc/rc.d/init.d/httpd restart 1>&2
77         fi
78 fi
79
80 %files
81 %defattr(644,root,root,755)
82 %doc AUTHORS ChangeLog mod_clamav.html NEWS README TODO
83 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
84 %attr(755,root,root) %{_pkglibdir}/*.so
This page took 0.046781 seconds and 2 git commands to generate.