]>
Commit | Line | Data |
---|---|---|
a2173f80 AG |
1 | # |
2 | %define mod_name timedout | |
3 | %define apxs %{_sbindir}/apxs | |
4 | Summary: Apache module: timedout | |
5 | Summary(pl.UTF-8): Moduł Apache'a: timedout | |
6 | Name: apache-mod_%{mod_name} | |
7 | Version: 0.1 | |
8 | Release: 1 | |
9 | License: GPL v2 | |
10 | Group: Networking/Daemons/HTTP | |
11 | Source0: http://dl.sourceforge.net/modtimedout/mod_%{mod_name}-%{version}.tar.bz2 | |
12 | # Source0-md5: 11e8b08c40b29654abf01df29a22715c | |
13 | Source1: %{name}.conf | |
14 | URL: http://modtimedout.sourceforge.net/ | |
15 | BuildRequires: %{apxs} | |
16 | BuildRequires: apache-devel >= 2.2 | |
17 | BuildRequires: rpmbuild(macros) >= 1.268 | |
18 | Requires: apache(modules-api) = %apache_modules_api | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
22 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d | |
23 | ||
24 | %description | |
25 | mod_timedout is an Apache module for checking the Apache free server | |
26 | count. When this is lower then defined in the configuration, it starts | |
27 | searching for long-running Apache requests, and either killing them or | |
28 | warning about plans to do it. | |
29 | ||
30 | %description -l pl.UTF-8 | |
31 | mod_timedout to moduł apache sprawdzający liczbę dostępnych serwerów. | |
32 | Gdy liczba ta jest poniżej wartości określonej w pliku | |
33 | konfiguracyjnym, moduł ten zaczyna wyszukiwanie najdłużej | |
34 | obsługiwanych żądań Apache i zabija je lub sygnalizuje takie zamiary. | |
35 | ||
36 | %prep | |
37 | %setup -q -n mod_%{mod_name}-%{version} | |
38 | %{__libtoolize} | |
39 | %{__aclocal} | |
40 | %{__autoconf} | |
41 | %{__automake} | |
42 | %configure \ | |
43 | --with-apache=/usr/include/apache \ | |
44 | --with-apr=$(apr-1-config --includedir) | |
45 | ||
46 | %build | |
47 | %{__make} \ | |
48 | CFLAGS="%{rpmcflags} $(apr-1-config --cflags --includes) $(apu-1-config --includes)" | |
49 | ||
50 | %install | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}} | |
53 | ||
54 | install .libs/libmodtimedout.so.0.0.0 $RPM_BUILD_ROOT%{_pkglibdir}/mod_%{mod_name}.so | |
55 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf | |
56 | ||
57 | %clean | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | ||
60 | %post | |
61 | %service -q httpd restart | |
62 | ||
63 | %postun | |
64 | if [ "$1" = "0" ]; then | |
65 | %service -q httpd restart | |
66 | fi | |
67 | ||
68 | %files | |
69 | %defattr(644,root,root,755) | |
70 | %doc AUTHORS NEWS README | |
71 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf | |
72 | %attr(755,root,root) %{_pkglibdir}/* |