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