2 %define _fmodname pecl_http
4 %define _sysconfdir /etc/php
5 %define extensionsdir %(php-config --extension-dir 2>/dev/null)
7 Summary: %{_modname} - extended HTTP support
8 Summary(pl): %{_modname} - rozszerzona obs³uga protoko³u HTTP
9 Name: php-pecl-%{_modname}
13 Group: Development/Languages/PHP
14 Source0: http://pecl.php.net/get/%{_fmodname}-%{version}.tgz
15 # Source0-md5: 96c16435936eab288d5fdd5750e3f863
16 URL: http://pecl.php.net/package/pecl_http/
17 BuildRequires: curl-devel >= 7.12.3
18 BuildRequires: openssl-devel
19 BuildRequires: php-devel >= 3:5.0.0
20 BuildRequires: rpmbuild(macros) >= 1.322
21 BuildRequires: zlib-devel >= 1.2.0.4
22 Requires: %{_sysconfdir}/conf.d
23 %{?requires_php_extension}
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}.
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}.
90 cd %{_fmodname}-%{version}
96 rm -rf $RPM_BUILD_ROOT
97 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
99 install %{_fmodname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}/%{_modname}.so
100 cat << 'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
101 ; Enable %{_modname} extension module
102 extension=%{_modname}.so
106 rm -rf $RPM_BUILD_ROOT
109 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
110 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
113 if [ "$1" = 0 ]; then
114 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
115 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
119 %defattr(644,root,root,755)
120 %doc %{_fmodname}-%{version}/{KnownIssues.txt,docs}
121 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
122 %attr(755,root,root) %{extensionsdir}/%{_modname}.so