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