]>
Commit | Line | Data |
---|---|---|
11bc755d AG |
1 | %define mod_name cband |
2 | %define apxs /usr/sbin/apxs | |
11bc755d | 3 | Summary: Apache module: bandwidth limits per vhosts |
246dd922 | 4 | Summary(pl.UTF-8): Moduł do Apache: limity pasma dla poszczególnych vhostów |
11bc755d | 5 | Name: apache-mod_%{mod_name} |
23f55fc8 | 6 | Version: 0.9.7.5 |
a252c843 | 7 | Release: 2 |
11bc755d | 8 | License: Apache |
5fbed7a7 | 9 | Group: Networking/Daemons/HTTP |
bbad1c5e | 10 | Source0: http://cband.linux.pl/download/mod-%{mod_name}-%{version}.tgz |
23f55fc8 | 11 | # Source0-md5: 5c5d65dc9abe6cdc6931b6dd33be5018 |
11bc755d | 12 | Source1: %{name}.conf |
11bc755d | 13 | URL: http://cband.linux.pl/ |
ad60920c | 14 | BuildRequires: %{apxs} |
2d7b94ee | 15 | BuildRequires: apache-devel >= 2.0.0 |
6bd986d3 | 16 | BuildRequires: rpmbuild(macros) >= 1.268 |
2d7b94ee | 17 | Requires: apache(modules-api) = %apache_modules_api |
11bc755d AG |
18 | Requires: crondaemon |
19 | Requires: procps | |
11bc755d AG |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
21 | ||
a252c843 ER |
22 | %define apacheconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d |
23 | %define apachelibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
2d7b94ee | 24 | |
11bc755d AG |
25 | %description |
26 | mod_cband is an Apache 2 module provided to solve the problem of | |
27 | limiting users' and virtualhosts' bandwidth usage. When the configured | |
28 | virtualhost's transfer limit is exceeded, mod_cband will redirect all | |
29 | further requests to a location specified in the configuration file. | |
30 | ||
61dea62d JR |
31 | %description -l pl.UTF-8 |
32 | mod_cband to moduł Apache'a 2 mający za zadanie ograniczanie zużycia | |
33 | pasma przez użytkowników i hosty wirtualne. Gdy określony limit | |
59120b67 JB |
34 | zostanie przekroczony, mod_cband przekieruje wszelkie zapytania do |
35 | strony wskazanej w pliku konfiguracyjnym. | |
11bc755d AG |
36 | |
37 | %prep | |
bbad1c5e | 38 | %setup -q -n mod-%{mod_name}-%{version} |
11bc755d AG |
39 | |
40 | %build | |
e9e8ee55 | 41 | %configure \ |
42 | --with-apxs=%{apxs} | |
43 | %{__make} | |
11bc755d AG |
44 | |
45 | %install | |
46 | rm -rf $RPM_BUILD_ROOT | |
a252c843 | 47 | install -d $RPM_BUILD_ROOT{%{apachelibdir},%{apacheconfdir}} |
11bc755d | 48 | |
a252c843 ER |
49 | install src/.libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{apachelibdir} |
50 | install %{SOURCE1} $RPM_BUILD_ROOT%{apacheconfdir}/97_mod_%{mod_name}.conf | |
11bc755d AG |
51 | |
52 | %clean | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %post | |
6bd986d3 | 56 | %service -q httpd restart |
11bc755d | 57 | |
f7f21214 | 58 | %postun |
11bc755d | 59 | if [ "$1" = "0" ]; then |
6bd986d3 | 60 | %service -q httpd restart |
11bc755d AG |
61 | fi |
62 | ||
63 | %files | |
64 | %defattr(644,root,root,755) | |
7d90467d | 65 | %doc AUTHORS Changes INSTALL conf/*.example |
a252c843 ER |
66 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{apacheconfdir}/*mod_*.conf |
67 | %attr(755,root,root) %{apachelibdir}/*.so |