1 %include /usr/lib/rpm/macros.php
3 %define _pearname HTTP_FloodControl
4 Summary: %{_pearname} - detect and protect from attempts to flood a site
5 Summary(pl.UTF-8): %{_pearname} - wykrywanie i ochrona przed atakami typu flood
6 Name: php-pear-%{_pearname}
10 Group: Development/Languages/PHP
11 Source0: http://pear.php.net/get/%{_pearname}-%{version}.tgz
12 # Source0-md5: 848fc5590d607b12f480faaf84fbf7c5
13 URL: http://pear.php.net/package/HTTP_FloodControl/
14 BuildRequires: php-pear-PEAR
15 BuildRequires: rpm-php-pearprov >= 4.4.2-11
16 BuildRequires: rpmbuild(macros) >= 1.571
18 Requires: php-pear-PEAR-core
19 Requires: php-pear-PEAR_Exception >= 1.3.3
21 Suggests: php-pear-MDB
22 Suggests: php-pear-MDB2
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 # exclude optional dependencies
27 %define _noautoreq 'pear(DB.*)' 'pear(MDB.*)' 'pear(MDB2.*)'
30 The HTTP_FloodControl package can be used to detect and protect a Web
31 site from attempts to flood it with too many requests. It also allows
32 to protect the site from automatic downloading many pages or files
33 from the same IP address, session ID or other unique identifier.
35 The detection of flood is determine according to a set of parameters
36 indicating the maximal allowed number of requests for the certain time
37 interval. It is possible to set several parameters at once in order to
38 perform more effective protection.
40 The package uses various storage containers (regular files, DB, MDB,
41 MDB2) to handle counter logs.
43 In PEAR status of this package is: %{_status}.
45 %description -l pl.UTF-8
46 Klasa HTTP_FloodControl może być użyta do wykrycia i ochrony stron WWW
47 przed próbami przepełnienia ich zbyt dużą ilością zapytań. Pozwala
48 także na ochronę serwisu przed automatycznym ściąganiem wielu stron
49 przez klienta identyfikowanego na podstawie adresu IP, identyfikatora
50 sesji bądź innego unikalnego identyfikatora.
52 Flood wykrywany jest na podstawie zestawu parametrów określających
53 maksymalną dozwoloną liczbę zapytań w zadanym przedziale czasowym.
54 Możliwe jest określenie wielu parametrów jednocześnie w celu
55 zapewnienia skutecznej ochrony.
57 Pakiet ten może skorzystać z różnych kontenerów danych (pliki, DB,
58 MDB, MDB2) w celu przechowywania logów liczników.
60 Ta klasa ma w PEAR status: %{_status}.
66 rm -rf $RPM_BUILD_ROOT
67 install -d $RPM_BUILD_ROOT%{php_pear_dir}/HTTP
69 mv -f $RPM_BUILD_ROOT%{php_pear_dir}/{Flood*,HTTP}
72 rm -rf $RPM_BUILD_ROOT
75 %pear_package_print_optionalpackages
78 %defattr(644,root,root,755)
79 %doc install.log optional-packages.txt
80 %{php_pear_dir}/.registry/*.reg
81 %{php_pear_dir}/HTTP/FloodControl.php
82 %{php_pear_dir}/HTTP/FloodControl