]>
Commit | Line | Data |
---|---|---|
1d94721e ER |
1 | %define modname http |
2 | %define fmodname pecl_http | |
3 | %define status stable | |
4 | Summary: %{modname} - extended HTTP support | |
5 | Summary(pl.UTF-8): %{modname} - rozszerzona obsługa protokołu HTTP | |
6 | Name: php-pecl-%{modname} | |
cf35e539 | 7 | Version: 1.7.1 |
125a29ef | 8 | Release: 3 |
f9b711cf | 9 | License: BSD, revised |
0dbef146 | 10 | Group: Development/Languages/PHP |
1d94721e | 11 | Source0: http://pecl.php.net/get/%{fmodname}-%{version}.tgz |
cf35e539 | 12 | # Source0-md5: 5047574da6b57741896e0463e84dbd8c |
0dbef146 | 13 | URL: http://pecl.php.net/package/pecl_http/ |
0fd77330 AG |
14 | BuildRequires: curl-devel >= 7.12.3 |
15 | BuildRequires: openssl-devel | |
0dbef146 | 16 | BuildRequires: php-devel >= 3:5.0.0 |
a8ebb114 | 17 | BuildRequires: rpmbuild(macros) >= 1.344 |
0fd77330 | 18 | BuildRequires: zlib-devel >= 1.2.0.4 |
ee26ce69 | 19 | %{?requires_php_extension} |
125a29ef | 20 | Requires: php(core) >= 5.0.4 |
b0c10ea9 | 21 | Requires: php-iconv |
125a29ef | 22 | Requires: php-session |
1d94721e | 23 | Obsoletes: php-pear-%{modname} |
0dbef146 AG |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
0dbef146 | 26 | %description |
6020d13f AG |
27 | This HTTP extension aims to provide a convenient and powerful set of |
28 | functionality for one of PHPs major applications. | |
29 | ||
30 | It eases handling of HTTP urls, dates, redirects, headers and | |
31 | messages, provides means for negotiation of clients preferred language | |
32 | and charset, as well as a convenient way to send any arbitrary data | |
33 | with caching and resuming capabilities. | |
34 | ||
35 | It provides powerful request functionality, if built with CURL | |
36 | support. Parallel requests are available for PHP 5 and greater. | |
37 | ||
38 | Currently implemented features include: | |
0dbef146 | 39 | - Building absolute URIs |
20775431 AG |
40 | - RFC compliant HTTP redirects |
41 | - RFC compliant HTTP date handling | |
99c9cffd | 42 | - Parsing of HTTP headers and messages |
20775431 AG |
43 | - Caching by "Last-Modified" and/or ETag (with 'on the fly' option for |
44 | ETag generation from buffered output) | |
0dbef146 AG |
45 | - Sending data/files/streams with (multiple) ranges support |
46 | - Negotiating user preferred language/charset | |
41b971e7 ER |
47 | - Convenient request functions to HEAD/GET/POST if libcurl is |
48 | available | |
20775431 | 49 | - HTTP auth hooks (Basic) |
41b971e7 ER |
50 | - PHP5 classes: HttpUtil, HttpResponse, HttpRequest, HttpRequestPool, |
51 | HttpMessage | |
0dbef146 | 52 | |
1d94721e | 53 | In PECL status of this extension is: %{status}. |
0dbef146 | 54 | |
c1b8b24f JR |
55 | %description -l pl.UTF-8 |
56 | To rozszerzenie HTTP ma na celu dostarczenie wygodnego i potężnego | |
57 | zestawu funkcjonalności do jednego z najważniejszych zastosowań PHP. | |
6020d13f | 58 | |
c1b8b24f JR |
59 | Ułatwia obsługę adresów HTTP, dat, przekierowań, nagłówków i |
60 | wiadmości, dostarcza sposób do negocjacji preferowanego języka i | |
61 | strony kodowej klienta, jak również wygodnego sposobu wysyłania | |
62 | dowolnego rodzaju danych z możliwością keszowania oraz wznawiania | |
63 | transferów. | |
6020d13f | 64 | |
c1b8b24f JR |
65 | Rozszerzenie dostarcza potężne możliwości zapytań, jeśli zbudowane |
66 | jest ze wsparciem dla CURL. Równoległe zapytania są dostępne od wersji | |
6020d13f AG |
67 | PHP 5. |
68 | ||
c1b8b24f JR |
69 | Aktualnie zaimplementowane możliwości to między innymi: |
70 | - tworzenie bezwzględnych URI | |
7547487a | 71 | - zgodne z RFC przekierowania HTTP |
c1b8b24f JR |
72 | - zgodna z RFC obsługa daty HTTP |
73 | - przetwarzanie nagłówków i wiadomości HTTP | |
74 | - buforowanie z użyciem "Last-Modified" i/lub ETagów (z opcję | |
75 | generowania "w locie" ETagów z buforowanego wyjścia) | |
76 | - wysyłanie danych/plików/strumieni z obsługą (wielu) przedziałów | |
77 | - negocjacja preferowanego przez użytkownika języka/zestawu znaków | |
78 | - wygodne funkcje do żądań HEAD/GET/POST jeśli dostępna jest libcurl | |
79 | - wywołania HTTP auth (Basic) | |
41b971e7 ER |
80 | - klasy PHP5: HttpUtil, HttpResponse, HttpRequest, HttpRequestPool, |
81 | HttpMessage | |
7547487a | 82 | |
1d94721e | 83 | To rozszerzenie ma w PECL status: %{status}. |
0dbef146 AG |
84 | |
85 | %prep | |
1d94721e ER |
86 | %setup -qc |
87 | mv %{fmodname}-%{version}/* . | |
0dbef146 AG |
88 | |
89 | %build | |
0dbef146 AG |
90 | phpize |
91 | %configure | |
92 | %{__make} | |
93 | ||
94 | %install | |
95 | rm -rf $RPM_BUILD_ROOT | |
a8ebb114 | 96 | install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}} |
0dbef146 | 97 | |
1d94721e ER |
98 | install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir} |
99 | cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini | |
100 | ; Enable %{modname} extension module | |
101 | extension=%{modname}.so | |
bc6565b8 | 102 | EOF |
0dbef146 AG |
103 | |
104 | %clean | |
105 | rm -rf $RPM_BUILD_ROOT | |
106 | ||
107 | %post | |
a8ebb114 | 108 | %php_webserver_restart |
0dbef146 | 109 | |
bc6565b8 AG |
110 | %postun |
111 | if [ "$1" = 0 ]; then | |
a8ebb114 | 112 | %php_webserver_restart |
0dbef146 AG |
113 | fi |
114 | ||
115 | %files | |
116 | %defattr(644,root,root,755) | |
1d94721e ER |
117 | %doc KnownIssues.txt docs/* |
118 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini | |
119 | %attr(755,root,root) %{php_extensiondir}/%{modname}.so |