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: 97d867fced7c93b7b6e016044faa7579
16 URL: http://pecl.php.net/package/pecl_http/
17 BuildRequires: php-devel >= 3:5.0.0
18 Requires: %{_sysconfdir}/conf.d
19 %{?requires_php_extension}
20 Obsoletes: php-pear-%{_modname}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 Currently implemented features:
25 - Building absolute URIs
26 - RFC compliant HTTP redirects
27 - RFC compliant HTTP date handling
28 - Parsing of HTTP headers and messages
29 - Caching by "Last-Modified" and/or ETag (with 'on the fly' option for
30 ETag generation from buffered output)
31 - Sending data/files/streams with (multiple) ranges support
32 - Negotiating user preferred language/charset
33 - Convenient request functions to HEAD/GET/POST if libcurl is
35 - HTTP auth hooks (Basic)
36 - PHP5 classes: HttpUtil, HttpResponse, HttpRequest, HttpRequestPool,
39 In PECL status of this extension is: %{_status}.
42 Aktualnie zaimplementowane mo¿liwo¶ci:
43 - tworzenie bezwzglêdnych URI
44 - zgodne z RFC przekierowania HTTP
45 - zgodna z RFC obs³uga daty HTTP
46 - przetwarzanie nag³ówków i wiadomo¶ci HTTP
47 - buforowanie z u¿yciem "Last-Modified" i/lub ETagów (z opcjê
48 generowania "w locie" ETagów z buforowanego wyj¶cia)
49 - wysy³anie danych/plików/strumieni z obs³ug± (wielu) przedzia³ów
50 - negocjacja preferowanego przez u¿ytkownika jêzyka/zestawu znaków
51 - wygodne funkcje do ¿±dañ HEAD/GET/POST je¶li dostêpna jest libcurl
52 - wywo³ania HTTP auth (Basic)
53 - klasy PHP5: HttpUtil, HttpResponse, HttpRequest, HttpRequestPool,
56 To rozszerzenie ma w PECL status: %{_status}.
62 cd %{_fmodname}-%{version}
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
71 install %{_fmodname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}/%{_modname}.so
72 cat << 'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
73 ; Enable %{_modname} extension module
74 extension=%{_modname}.so
78 rm -rf $RPM_BUILD_ROOT
81 [ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
82 [ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
86 [ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
87 [ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
91 %defattr(644,root,root,755)
92 %doc %{_fmodname}-%{version}/{docs,EXPERIMENTAL}
93 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
94 %attr(755,root,root) %{extensionsdir}/%{_modname}.so