]> git.pld-linux.org Git - packages/apache-mod_clamav.git/blob - apache-mod_clamav.spec
d7fbf16516fae1dfd5ca98bfc2bd2deae5680066
[packages/apache-mod_clamav.git] / apache-mod_clamav.spec
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}
6 Version:        0.21
7 Release:        1
8 License:        GPL
9 Group:          Networking/Daemons
10 Source0:        http://software.othello.ch/mod_clamav/mod_%{mod_name}-%{version}.tar.gz
11 # Source0-md5:  98bd0d8628be8ddeae21da6623e57d20
12 Source1:        %{name}.conf
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:  bzip2-devel
22 BuildRequires:  clamav-devel
23 BuildRequires:  gmp-devel
24 Requires:       apache >= 2
25 Requires:       apache-mod_proxy
26 Requires:       clamav
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
30 %define         _sysconfdir     /etc/httpd
31 %define         _libexecdir     %{_libdir}/apache
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 %{__aclocal}
49 %{__autoconf}
50 %{__automake}
51
52 CPPFLAGS="-I `/usr/bin/apr-config --includedir` -I `/usr/bin/apu-config --includedir`"
53 export CPPFLAGS
54
55 %configure \
56         --with-apxs=%{apxs}
57
58 %{__make}
59
60 %install
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
63
64 install .libs/mod_%{mod_name}.0.0.0 $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so
65
66 CFG="$RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf"
67 install %{SOURCE1} ${CFG}/32_mod_clamav.conf
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 %post
73 if [ -f /var/lock/subsys/httpd ]; then
74         /etc/rc.d/init.d/httpd restart 1>&2
75 else
76         echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
77 fi
78
79 %preun
80 if [ "$1" = "0" ]; then
81         if [ -f /var/lock/subsys/httpd ]; then
82                 /etc/rc.d/init.d/httpd restart 1>&2
83         fi
84 fi
85
86 %files
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
This page took 0.044867 seconds and 2 git commands to generate.