]> git.pld-linux.org Git - packages/apache-mod_clamav.git/blob - apache-mod_clamav.spec
- fix libtool, -avoid-version to get proper soname
[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:  clamav-devel
22 BuildRequires:  libtool
23 Requires:       apache >= 2
24 Requires:       apache-mod_proxy
25 Requires:       clamav
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR)
29 %define         _sysconfdir     /etc/httpd
30 %define         _libexecdir     %{_libdir}/apache
31
32 %description
33 mod_clamav is an Apache 2 filter which scans the content delivered by
34 the proxy module (mod_proxy) for viruses using the Clamav virus
35 scanning engine.
36
37 %description -l pl
38 mod_clamav to filtr dla serwera Apache 2 skanuj±cy tre¶ci dostarczane
39 przez modu³ proxy (mod_proxy) pod k±tem wirusów przy u¿yciu silnika
40 skanera antywirusowego Clamav.
41
42 %prep
43 %setup -q -n mod_%{mod_name}-%{version}
44 %patch0 -p0
45
46 %{__perl} -pi -e 's/(-module)/$1 -avoid-version/' Makefile.am
47
48 %build
49 %{__libtoolize}
50 %{__aclocal}
51 %{__autoconf}
52 %{__automake}
53
54 CPPFLAGS="-I `/usr/bin/apr-config --includedir` -I `/usr/bin/apu-config --includedir`"
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}.so $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.093135 seconds and 3 git commands to generate.