]>
Commit | Line | Data |
---|---|---|
3e629c7a | 1 | %include /usr/lib/rpm/macros.php |
3e629c7a AG |
2 | %define _status alpha |
3 | %define _pearname HTTP_FloodControl | |
4 | Summary: %{_pearname} - detect and protect from attempts to flood a site | |
14e5cfc4 | 5 | Summary(pl.UTF-8): %{_pearname} - wykrywanie i ochrona przed atakami typu flood |
3e629c7a AG |
6 | Name: php-pear-%{_pearname} |
7 | Version: 0.1.1 | |
ad66079b | 8 | Release: 4 |
3e629c7a AG |
9 | License: LGPL |
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 | Requires: php-pear | |
f90484bd | 17 | Requires: php-pear-PEAR-core |
ad66079b ER |
18 | Requires: php-pear-PEAR_Exception >= 1.3.3 |
19 | Suggests: php-pear-DB | |
20 | Suggests: php-pear-MDB | |
21 | Suggests: php-pear-MDB2 | |
3e629c7a AG |
22 | BuildArch: noarch |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | # exclude optional dependencies | |
26 | %define _noautoreq 'pear(DB.*)' 'pear(MDB.*)' 'pear(MDB2.*)' | |
27 | ||
28 | %description | |
29 | The HTTP_FloodControl package can be used to detect and protect a Web | |
30 | site from attempts to flood it with too many requests. It also allows | |
31 | to protect the site from automatic downloading many pages or files | |
32 | from the same IP address, session ID or other unique identifier. | |
33 | ||
34 | The detection of flood is determine according to a set of parameters | |
35 | indicating the maximal allowed number of requests for the certain time | |
36 | interval. It is possible to set several parameters at once in order to | |
37 | perform more effective protection. | |
38 | ||
39 | The package uses various storage containers (regular files, DB, MDB, | |
40 | MDB2) to handle counter logs. | |
41 | ||
42 | In PEAR status of this package is: %{_status}. | |
43 | ||
44 | %description -l pl.UTF-8 | |
ad66079b ER |
45 | Klasa HTTP_FloodControl może być użyta do wykrycia i ochrony stron WWW |
46 | przed próbami przepełnienia ich zbyt dużą ilością zapytań. Pozwala | |
14e5cfc4 | 47 | także na ochronę serwisu przed automatycznym ściąganiem wielu stron |
3e629c7a AG |
48 | przez klienta identyfikowanego na podstawie adresu IP, identyfikatora |
49 | sesji bądź innego unikalnego identyfikatora. | |
50 | ||
51 | Flood wykrywany jest na podstawie zestawu parametrów określających | |
52 | maksymalną dozwoloną liczbę zapytań w zadanym przedziale czasowym. | |
53 | Możliwe jest określenie wielu parametrów jednocześnie w celu | |
54 | zapewnienia skutecznej ochrony. | |
55 | ||
56 | Pakiet ten może skorzystać z różnych kontenerów danych (pliki, DB, | |
14e5cfc4 | 57 | MDB, MDB2) w celu przechowywania logów liczników. |
3e629c7a AG |
58 | |
59 | Ta klasa ma w PEAR status: %{_status}. | |
60 | ||
61 | %prep | |
62 | %pear_package_setup | |
63 | ||
64 | %install | |
65 | rm -rf $RPM_BUILD_ROOT | |
f90484bd | 66 | install -d $RPM_BUILD_ROOT%{php_pear_dir}/HTTP |
3e629c7a | 67 | %pear_package_install |
f90484bd | 68 | mv -f $RPM_BUILD_ROOT%{php_pear_dir}/{Flood*,HTTP} |
3e629c7a AG |
69 | |
70 | %clean | |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | ||
73 | %post | |
74 | if [ -f %{_docdir}/%{name}-%{version}/optional-packages.txt ]; then | |
75 | cat %{_docdir}/%{name}-%{version}/optional-packages.txt | |
76 | fi | |
77 | ||
78 | %files | |
79 | %defattr(644,root,root,755) | |
80 | %doc install.log optional-packages.txt | |
81 | %{php_pear_dir}/.registry/*.reg | |
f90484bd AG |
82 | %{php_pear_dir}/HTTP/FloodControl/ |
83 | %{php_pear_dir}/HTTP/FloodControl.php |