]> git.pld-linux.org Git - packages/apache1-mod_throttle.git/blob - apache1-mod_throttle.spec
- obsoletes with constant version
[packages/apache1-mod_throttle.git] / apache1-mod_throttle.spec
1 %bcond_without  ipv6            # disable IPv6 support
2
3 %define         mod_name        throttle
4 %define         apxs            /usr/sbin/apxs1
5 Summary:        Bandwidth & Request Throttling for Apache
6 Summary(cs):    Omezení sí»ového provozu pro Apache
7 Summary(de):    Ein Modul, das die Bandbreiten- und Anforderungseinschränkung für Apache implementiert
8 Summary(es):    Módulo que implementa la gestión de ancho de banda y peticiones para Apache
9 Summary(fr):    Module qui met en oeuvre la bande passante et l'étranglement requis pour Apache
10 Summary(it):    Modulo che implementa la larghezza di banda e la richiesta di throttling per Apache
11 Summary(ja):    Apache ÍÑÂÓ°èÉý¤ª¤è¤ÓÍ׵᥹¥í¥Ã¥È¥ë¤ò¼ÂÁõ¤¹¤ë¥â¥¸¥å¡¼¥ë
12 Summary(pl):    T³umienie przepustowo¶ci i zapytañ dla Apache'a
13 Summary(pt_BR): Descompressão "On-the-fly" de arquivos HTML para o Apache
14 Summary(sv):    En modul som implementerar bandvidd- och begäranbegränsningar i Apache
15 Name:           apache1-mod_%{mod_name}
16 Version:        3.1.2
17 Release:        3
18 License:        BSD-like
19 Group:          Networking/Daemons
20 Source0:        http://www.snert.com/Software/mod_throttle/mod_throttle312.tgz
21 # Source0-md5:  6edc45c3ea8a0855d4b0b14cf0f76404
22 Patch0:         apache1-mod_throttle-PLD-v6stuff.patch
23 URL:            http://www.snert.com/Software/mod_throttle/
24 BuildRequires:  %{apxs}
25 #{?with_ipv6:BuildRequires:     apache1(ipv6)-devel}
26 BuildRequires:  apache1-devel >= 1.3.33-2
27 Requires(triggerpostun):        %{apxs}
28 Requires:       apache1 >= 1.3.33-2
29 Obsoletes:      apache-mod_%{mod_name} <= 3.1.2
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
33 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
34 %define         _pkglogdir      %(%{apxs} -q PREFIX 2>/dev/null)/logs
35
36 %description
37 This Apache module is intended to reduce the load on your server &
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.
42
43 %description -l cs
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.
48
49 %description -l de
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
52 einzelne virtuelle Rechner, Verzeichnisse, Speicherstellen oder
53 authentifizierte Benutzer eingestellt werden.
54
55 %description -l es
56 Mod_throttle puede usarse para limitar la cantidad de datos que su
57 servidor web va a servir. Estos límites se pueden configurar para
58 hosts virtuales individuales, directorios, lugares o usuarios
59 autenticados.
60
61 %description -l fr
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.
66
67 %description -l it
68 Mod_throttle può essere usato per limitare la quantità di dati che il
69 server Web dovrà servire. Queste limitazioni possono essere
70 configurate per singoli host virtuali, directory, indirizzi o utenti
71 autenticati.
72
73 %description -l ja
74 Mod_throttle ¤Ë¤è¤Ã¤Æ Web ¥µ¡¼¥Ð¡¼¤¬½èÍý¤¹¤ë¥Ç¡¼¥¿Î̤òÀ©¸Â¤Ç¤­¤Þ¤¹
75 ¤³¤ì¤é¤ÎÀ©¸Â¤Ï¡¢¸Ä¡¹¤Î²¾ÁÛ¥Û¥¹¥È¡¢¥Ç¥£¥ì¥¯¥È¥ê¡¢¾ì½ê¡¢¤Þ¤¿¤Ï
76 ǧ¾Ú¥æ¡¼¥¶¡¼ÍѤˤĤ¤¤ÆÀßÄê¤Ç¤­¤Þ¤¹¡£
77
78 %description -l pl
79 Ten modu³ Apache ma s³u¿yæ do zmniejszania obci±¿enia serwera i ruchu
80 generowanego przez popularne hosty wirtualne, katalogi, pliki lub
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.
85
86 %description -l pt_BR
87 Descompressão "On-the-fly" de arquivos HTML para o Apache.
88
89 %description -l sv
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.
93
94 %prep
95 %setup -q -n mod_%{mod_name}-%{version}
96 %{?with_ipv6:%patch0 -p1}
97
98 %build
99 %{apxs} -o mod_%{mod_name}.so -c mod_%{mod_name}.c
100
101 %install
102 rm -rf $RPM_BUILD_ROOT
103 install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d,%{_pkglogdir}}
104
105 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
106
107 echo 'LoadModule %{mod_name}_module     modules/mod_%{mod_name}.so' > \
108         $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
109
110 sed -e 's/<!--#/<!--/g' index.shtml > mod_%{mod_name}.html
111
112 > $RPM_BUILD_ROOT%{_pkglogdir}/mod_throttle.runtime
113
114 %clean
115 rm -rf $RPM_BUILD_ROOT
116
117 %post
118 if [ -f /var/lock/subsys/apache ]; then
119         /etc/rc.d/init.d/apache restart 1>&2
120 else
121         echo "Run \"/etc/rc.d/init.d/apache start\" to start apache HTTP daemon."
122 fi
123
124 %postun
125 if [ "$1" = "0" ]; then
126         if [ -f /var/lock/subsys/apache ]; then
127                 /etc/rc.d/init.d/apache restart 1>&2
128         fi
129 fi
130
131 %triggerpostun -- apache1-mod_%{mod_name} < 3.1.2-1.1
132 # check that they're not using old apache.conf
133 if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
134         %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
135 fi
136
137 %files
138 %defattr(644,root,root,755)
139 %doc *.txt *.html
140 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
141 %attr(755,root,root) %{_pkglibdir}/*
142 %attr(660,root,http) %ghost %{_pkglogdir}/*
This page took 0.070658 seconds and 3 git commands to generate.