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