]> git.pld-linux.org Git - packages/apache-mod_clamav.git/blob - apache-mod_clamav.spec
- spaces -> tabs
[packages/apache-mod_clamav.git] / apache-mod_clamav.spec
1 # $Revision: 1.3 $
2 %define         apxs            /usr/sbin/apxs
3 %define         mod_name        clamav
4 Summary:        An Apache virus scanning filter
5 Summary(pl):    Filtr skanera antywirusowego dla Apache'a
6 Name:           apache-mod_%{mod_name}
7 Version:        0.12
8 Release:        1
9 License:        GPL
10 Group:          Networking/Daemons
11 Source0:        http://software.othello.ch/mod_clamav/mod_%{mod_name}-%{version}.tar.gz
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
17 BuildRequires:  apr-devel
18 BuildRequires:  apr-util-devel
19 BuildRequires:  autoconf
20 BuildRequires:  automake
21 Requires:       apache >= 2
22 Requires:       apache-mod_proxy
23 Requires:       clamav
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
27 %define         _sysconfdir     /etc/httpd
28 %define         _libexecdir     %{_libdir}/apache
29
30 %description
31 mod_clamav is an Apache 2 filter which scans the content delivered by
32 the proxy module (mod_proxy) for viruses using the Clamav virus
33 scanning engine.
34
35 %description -l pl
36 mod_clamav to filtr dla serwera Apache 2 skanuj±cy tre¶ci dostarczane
37 przez modu³ proxy (mod_proxy) pod k±tem wirusów przy u¿yciu silnika
38 skanera antywirusowego Clamav.
39
40 %prep
41 %setup -q -n mod_%{mod_name}-%{version}
42 %patch0 -p0
43
44 %build
45 %{__aclocal}
46 %{__autoconf}
47 %{__automake}
48
49 CPPFLAGS="-I `/usr/bin/apr-config --includedir` -I `/usr/bin/apu-config --includedir`"
50 export CPPFLAGS
51
52 %configure \
53         --with-apxs=%{apxs}
54
55 %{__make}
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf}
60
61 install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
62
63 CFG="$RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf"
64 install %{SOURCE1} ${CFG}/32_mod_clamav.conf
65
66 %clean
67 rm -rf $RPM_BUILD_ROOT
68
69 %post
70 if [ -f /var/lock/subsys/httpd ]; then
71         /etc/rc.d/init.d/httpd restart 1>&2
72 else
73         echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
74 fi
75
76 %preun
77 if [ "$1" = "0" ]; then
78         if [ -f /var/lock/subsys/httpd ]; then
79                 /etc/rc.d/init.d/httpd restart 1>&2
80         fi
81 fi
82
83 %files
84 %defattr(644,root,root,755)
85 %doc AUTHORS ChangeLog COPYING INSTALL mod_clamav.html NEWS README TODO
86 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd.conf/32_mod_clamav.conf
87 %attr(755,root,root) %{_libexecdir}/mod_%{mod_name}.so
This page took 0.068209 seconds and 4 git commands to generate.