]>
Commit | Line | Data |
---|---|---|
e8c35283 ER |
1 | %define mod_name iptos |
2 | %define apxs %{_sbindir}/apxs1 | |
5eb631bb | 3 | Summary: Apache module: assign IPTOS bits to different vhosts or directories |
1f27e2a7 | 4 | Summary(pl.UTF-8): Moduł Apache'a: przypisywanie bitów IPTOS do różnych vhostów i katalogów |
e8c35283 ER |
5 | Name: apache1-mod_%{mod_name} |
6 | Version: 1.1 | |
ee06a9c3 | 7 | Release: 0.2 |
e8c35283 ER |
8 | License: Apache 1.1 |
9 | Group: Networking/Daemons | |
10 | Source0: http://www.arctic.org/~dean/mod_iptos/libapache-mod-%{mod_name}_%{version}.orig.tar.gz | |
11 | # Source0-md5: 1e5582acf63b6fabf567ecb79e57bdd5 | |
12 | URL: http://www.arctic.org/~dean/mod_iptos/ | |
dd83fb38 | 13 | BuildRequires: apache1-devel >= 1.3.39 |
e8c35283 | 14 | BuildRequires: rpmbuild(macros) >= 1.228 |
ee06a9c3 | 15 | Requires: apache1(EAPI) |
e8c35283 ER |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
17 | ||
18 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
19 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
20 | ||
21 | %description | |
5eb631bb JB |
22 | Modify IPTOS bits on outbound data for fine-tuned traffic shaping. |
23 | mod_iptos is a module for Apache 1.3.x which allows the admin to | |
e8c35283 ER |
24 | assign different IPTOS bits to different vhosts or directories. This |
25 | can be used in combination with traffic shaping to give much better | |
26 | control (than other userland-only solutions such as mod_bandwidth) | |
27 | over the bandwidth for various portions of a website. | |
28 | ||
cbc15577 JR |
29 | %description -l pl.UTF-8 |
30 | Moduł ten ma na celu modyfikowanie bitów IPTOS danych wychodzących w | |
31 | celu poprawienia możliwości ograniczania pasma. mod_iptos to moduł dla | |
32 | Apache'a 1.3.x umożliwiający przypisywanie różnych bitów IPTOS do | |
33 | różnych vhostów i katalogów. Można to wykorzystać w połączeniu z | |
34 | ograniczaniem ruchu w celu lepszej kontroli (niż inne rozwiązania | |
35 | działające wyłącznie w przestrzeni użytkownika, takie jak | |
36 | mod_bandwidth) nad pasmem dla różnych części serwisu WWW. | |
5eb631bb | 37 | |
e8c35283 ER |
38 | %prep |
39 | %setup -q -n libapache-mod-%{mod_name}-%{version} | |
40 | ||
41 | %build | |
42 | %{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so | |
43 | ||
44 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d} | |
47 | ||
48 | install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
49 | echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ | |
50 | $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf | |
51 | ||
52 | %clean | |
53 | rm -rf $RPM_BUILD_ROOT | |
54 | ||
55 | %post | |
56 | %service apache restart | |
57 | ||
58 | %postun | |
59 | if [ "$1" = "0" ]; then | |
60 | %service -q apache restart | |
61 | fi | |
62 | ||
63 | %files | |
64 | %defattr(644,root,root,755) | |
65 | %doc README debian/changelog | |
66 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf | |
67 | %attr(755,root,root) %{_pkglibdir}/* |