]>
Commit | Line | Data |
---|---|---|
ae19f32d ER |
1 | %bcond_without ipv6 # disable IPv6 support |
2 | ||
6d6464d3 | 3 | %define mod_name throttle |
4 | %define apxs /usr/sbin/apxs1 | |
15d1b3fb | 5 | Summary: Bandwidth & Request Throttling for Apache |
195dcea3 ER |
6 | Summary(cs.UTF-8): Omezení síťového provozu pro Apache |
7 | Summary(de.UTF-8): Ein Modul, das die Bandbreiten- und Anforderungseinschränkung für Apache implementiert | |
8 | Summary(es.UTF-8): Módulo que implementa la gestión de ancho de banda y peticiones para Apache | |
9 | Summary(fr.UTF-8): Module qui met en oeuvre la bande passante et l'étranglement requis pour Apache | |
10 | Summary(it.UTF-8): Modulo che implementa la larghezza di banda e la richiesta di throttling per Apache | |
11 | Summary(ja.UTF-8): Apache 用帯域幅および要求スロットルを実装するモジュール | |
12 | Summary(pl.UTF-8): Tłumienie przepustowości i zapytań dla Apache'a | |
13 | Summary(pt_BR.UTF-8): Descompressão "On-the-fly" de arquivos HTML para o Apache | |
14 | Summary(sv.UTF-8): En modul som implementerar bandvidd- och begäranbegränsningar i Apache | |
6d6464d3 | 15 | Name: apache1-mod_%{mod_name} |
39868455 | 16 | Version: 3.1.2 |
911a929d | 17 | Release: 4 |
fdabe731 | 18 | License: BSD-like |
39868455 | 19 | Group: Networking/Daemons |
20 | Source0: http://www.snert.com/Software/mod_throttle/mod_throttle312.tgz | |
bad0518d | 21 | # Source0-md5: 6edc45c3ea8a0855d4b0b14cf0f76404 |
0c0d3289 | 22 | Patch0: apache1-mod_throttle-PLD-v6stuff.patch |
39868455 | 23 | URL: http://www.snert.com/Software/mod_throttle/ |
fe6eb984 | 24 | #{?with_ipv6:BuildRequires: apache1(ipv6)-devel} |
873838be | 25 | BuildRequires: apache1-devel >= 1.3.39 |
814fc43d | 26 | BuildRequires: rpmbuild(macros) >= 1.268 |
ae19f32d | 27 | Requires(triggerpostun): %{apxs} |
911a929d | 28 | Requires: apache1(EAPI) |
814fc43d | 29 | Obsoletes: apache-mod_throttle <= 3.1.2 |
39868455 | 30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
ae19f32d ER |
32 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
33 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
f6e6d022 | 34 | %define _pkglogdir %(%{apxs} -q PREFIX 2>/dev/null)/logs |
39868455 | 35 | |
36 | %description | |
37 | This Apache module is intended to reduce the load on your server & | |
3a912cef | 38 | bandwidth generated by popular virtual hosts, directories, locations, |
39 | or users according to supported polices (see below) that decide when | |
40 | to delay or refuse requests. Also mod_throttle can track and throttle | |
41 | incoming connections by IP address or by authenticated remote user. | |
39868455 | 42 | |
ece14ce8 JR |
43 | %description -l cs.UTF-8 |
44 | Balíček mod_throttle obsahuje modul, který umožňuje omezit průtok dat, | |
45 | která odcházejí z WWW serveru Apache. Limity mohou být nastaveny pro | |
46 | jednotlivé virtuální weby, adresáře, umístění nebo autentizované | |
47 | uživatele. | |
15d1b3fb | 48 | |
ece14ce8 JR |
49 | %description -l de.UTF-8 |
50 | Mod_throttle kann verwendet werden, um die Datenmenge zu beschränken, | |
51 | die Ihr Web-Server behandelt. Diese Einschränkungen können für | |
15d1b3fb | 52 | einzelne virtuelle Rechner, Verzeichnisse, Speicherstellen oder |
53 | authentifizierte Benutzer eingestellt werden. | |
54 | ||
ece14ce8 | 55 | %description -l es.UTF-8 |
15d1b3fb | 56 | Mod_throttle puede usarse para limitar la cantidad de datos que su |
ece14ce8 | 57 | servidor web va a servir. Estos límites se pueden configurar para |
d9b7adbf | 58 | hosts virtuales individuales, directorios, lugares o usuarios |
15d1b3fb | 59 | autenticados. |
60 | ||
ece14ce8 JR |
61 | %description -l fr.UTF-8 |
62 | Mod_throttle peut être utilisé pour limiter la quantité de données | |
63 | servies par votre serveur Web. Ces limites peuvent être définies pour | |
64 | des hôtes virtuels individuels, répertoires, emplacements ou | |
65 | utilisateurs authentifiés. | |
15d1b3fb | 66 | |
ece14ce8 JR |
67 | %description -l it.UTF-8 |
68 | Mod_throttle può essere usato per limitare la quantità di dati che il | |
69 | server Web dovrà servire. Queste limitazioni possono essere | |
15d1b3fb | 70 | configurate per singoli host virtuali, directory, indirizzi o utenti |
71 | autenticati. | |
72 | ||
ece14ce8 JR |
73 | %description -l ja.UTF-8 |
74 | Mod_throttle によって Web サーバーが処理するデータ量を制限できます | |
75 | これらの制限は、個々の仮想ホスト、ディレクトリ、場所、または | |
76 | 認証ユーザー用について設定できます。 | |
15d1b3fb | 77 | |
ece14ce8 JR |
78 | %description -l pl.UTF-8 |
79 | Ten moduł Apache ma służyć do zmniejszania obciążenia serwera i ruchu | |
8d9664c4 | 80 | generowanego przez popularne hosty wirtualne, katalogi, pliki lub |
ece14ce8 JR |
81 | użytkowników zgodnie z obsługiwanymi polisami, które decydują kiedy |
82 | opóźnić lub odrzucić zapytanie. mod_throttle może także śledzić i | |
83 | tłumić połączenia przychodzące z danego adresu IP lub danego, | |
84 | autentykującego się, użytkownika. | |
8eed4cfc | 85 | |
ece14ce8 JR |
86 | %description -l pt_BR.UTF-8 |
87 | Descompressão "On-the-fly" de arquivos HTML para o Apache. | |
b1cd24bd | 88 | |
ece14ce8 JR |
89 | %description -l sv.UTF-8 |
90 | Mod_throttle kan användas för att begränsa mängden data som din | |
91 | webbserver skickar. Dessa gränser kan sättas för enskilda virtuella | |
92 | värdar, kataloger, platser eller autenticerade användare. | |
15d1b3fb | 93 | |
39868455 | 94 | %prep |
6d6464d3 | 95 | %setup -q -n mod_%{mod_name}-%{version} |
ae19f32d | 96 | %{?with_ipv6:%patch0 -p1} |
39868455 | 97 | |
98 | %build | |
6d6464d3 | 99 | %{apxs} -o mod_%{mod_name}.so -c mod_%{mod_name}.c |
39868455 | 100 | |
101 | %install | |
102 | rm -rf $RPM_BUILD_ROOT | |
f6e6d022 | 103 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d,%{_pkglogdir}} |
39868455 | 104 | |
6d6464d3 | 105 | install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} |
39868455 | 106 | |
ae19f32d ER |
107 | echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ |
108 | $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf | |
109 | ||
6d6464d3 | 110 | sed -e 's/<!--#/<!--/g' index.shtml > mod_%{mod_name}.html |
39868455 | 111 | |
f6e6d022 ER |
112 | > $RPM_BUILD_ROOT%{_pkglogdir}/mod_throttle.runtime |
113 | ||
8d9664c4 JB |
114 | %clean |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | ||
39868455 | 117 | %post |
814fc43d | 118 | %service -q apache restart |
39868455 | 119 | |
d7729c21 | 120 | %postun |
39868455 | 121 | if [ "$1" = "0" ]; then |
814fc43d | 122 | %service -q apache restart |
39868455 | 123 | fi |
124 | ||
ae19f32d ER |
125 | %triggerpostun -- apache1-mod_%{mod_name} < 3.1.2-1.1 |
126 | # check that they're not using old apache.conf | |
127 | if grep -q '^Include conf\.d' /etc/apache/apache.conf; then | |
128 | %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2 | |
129 | fi | |
130 | ||
39868455 | 131 | %files |
132 | %defattr(644,root,root,755) | |
0854ba96 | 133 | %doc *.txt *.html |
389d149c | 134 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf |
6d6464d3 | 135 | %attr(755,root,root) %{_pkglibdir}/* |
f6e6d022 | 136 | %attr(660,root,http) %ghost %{_pkglogdir}/* |