]>
Commit | Line | Data |
---|---|---|
6674f92f | 1 | %define mod_name evasive |
2 | %define apxs %{_sbindir}/apxs | |
3 | Summary: Apache module: evasive | |
4 | Summary(pl.UTF-8): Moduł Apache'a: evasive | |
5 | Name: apache-mod_%{mod_name} | |
6 | Version: 1.10.1 | |
7 | Release: 1 | |
8 | License: GPL | |
9 | Group: Networking/Daemons/HTTP | |
e9af2617 | 10 | Source0: http://www.zdziarski.com/projects/mod_evasive/mod_evasive_%{version}.tar.gz |
6674f92f | 11 | # Source0-md5: 784fca4a124f25ccff5b48c7a69a65e5 |
12 | Source1: %{name}.conf | |
13 | URL: http://www.zdziarski.com/projects/mod_evasive/ | |
14 | BuildRequires: %{apxs} | |
15 | BuildRequires: apache-devel >= 2.2 | |
16 | BuildRequires: rpmbuild(macros) >= 1.268 | |
17 | Requires: apache(modules-api) = %apache_modules_api | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
21 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d | |
22 | ||
23 | %description | |
24 | mod_evasive is an evasive maneuvers module for Apache. | |
25 | ||
26 | %description -l pl.UTF-8 | |
27 | ||
28 | %prep | |
29 | %setup -q -n mod_%{mod_name} | |
30 | ||
31 | %build | |
e9af2617 | 32 | %{apxs} -c mod_%{mod_name}20.c -o mod_%{mod_name}20.la -DMAILER='/usr/lib/sendmail -t' |
6674f92f | 33 | |
34 | %install | |
35 | rm -rf $RPM_BUILD_ROOT | |
36 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}} | |
6674f92f | 37 | install .libs/mod_%{mod_name}20.so $RPM_BUILD_ROOT%{_pkglibdir} |
6674f92f | 38 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf |
39 | ||
40 | %clean | |
41 | rm -rf $RPM_BUILD_ROOT | |
42 | ||
43 | %post | |
44 | %service -q httpd restart | |
45 | ||
46 | %postun | |
47 | if [ "$1" = "0" ]; then | |
48 | %service -q httpd restart | |
49 | fi | |
50 | ||
51 | %files | |
52 | %defattr(644,root,root,755) | |
53 | %doc README | |
54 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf | |
e9af2617 | 55 | %attr(755,root,root) %{_pkglibdir}/*.so |