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: 3d36be8577cf6d46c2372056e22e0669
14 URL: http://pecl.php.net/package/pecl_http/
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
19 BuildRequires: openssl-devel
20 BuildRequires: rpmbuild(macros) >= 1.650
21 BuildRequires: zlib-devel >= 1.2.0.4
22 %{?requires_php_extension}
23 Requires: %{php_name}-hash
24 Requires: %{php_name}-iconv
25 Requires: %{php_name}-session
26 Provides: php(%{modname}) = %{version}
27 Obsoletes: php-pecl-http < 1.7.6-4
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 This HTTP extension aims to provide a convenient and powerful set of
32 functionality for one of PHPs major applications.
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.
39 It provides powerful request functionality, if built with CURL
40 support. Parallel requests are available for PHP 5 and greater.
42 Currently implemented features include:
43 - Building absolute URIs
44 - RFC compliant HTTP redirects
45 - RFC compliant HTTP date handling
46 - Parsing of HTTP headers and messages
47 - Caching by "Last-Modified" and/or ETag (with 'on the fly' option for
48 ETag generation from buffered output)
49 - Sending data/files/streams with (multiple) ranges support
50 - Negotiating user preferred language/charset
51 - Convenient request functions to HEAD/GET/POST if libcurl is
53 - HTTP auth hooks (Basic)
54 - PHP5 classes: HttpUtil, HttpResponse, HttpRequest, HttpRequestPool,
57 In PECL status of this extension is: %{status}.
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.
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
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
73 Aktualnie zaimplementowane możliwości to między innymi:
74 - tworzenie bezwzględnych URI
75 - zgodne z RFC przekierowania HTTP
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)
84 - klasy PHP5: HttpUtil, HttpResponse, HttpRequest, HttpRequestPool,
87 To rozszerzenie ma w PECL status: %{status}.
91 mv %{fmodname}-%{version}/* .
102 rm -rf $RPM_BUILD_ROOT
103 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
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
112 rm -rf $RPM_BUILD_ROOT
115 %php_webserver_restart
118 if [ "$1" = 0 ]; then
119 %php_webserver_restart
123 %defattr(644,root,root,755)
124 %doc KnownIssues.txt Exceptions.txt ThanksTo.txt CREDITS
125 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
126 %attr(755,root,root) %{php_extensiondir}/%{modname}.so