]> git.pld-linux.org Git - packages/php-pecl-http.git/blob - php-pecl-http.spec
- updated to 1.0.1 (stable)
[packages/php-pecl-http.git] / php-pecl-http.spec
1 %define         _modname        http
2 %define         _fmodname       pecl_http
3 %define         _status         stable
4 %define         _sysconfdir     /etc/php
5 %define         extensionsdir   %(php-config --extension-dir 2>/dev/null)
6
7 Summary:        %{_modname} - extended HTTP support
8 Summary(pl):    %{_modname} - rozszerzona obs³uga protoko³u HTTP
9 Name:           php-pecl-%{_modname}
10 Version:        1.0.1
11 Release:        1
12 License:        BSD
13 Group:          Development/Languages/PHP
14 Source0:        http://pecl.php.net/get/%{_fmodname}-%{version}.tgz
15 # Source0-md5:  3246a4a1fb9297f91abd8585ee98ae7d
16 URL:            http://pecl.php.net/package/pecl_http/
17 BuildRequires:  php-devel >= 3:5.0.0
18 BuildRequires:  rpmbuild(macros) >= 1.254
19 Requires:       %{_sysconfdir}/conf.d
20 %{?requires_php_extension}
21 Obsoletes:      php-pear-%{_modname}
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 This HTTP extension aims to provide a convenient and powerful set of
26 functionality for one of PHPs major applications.
27
28 It eases handling of HTTP urls, dates, redirects, headers and
29 messages, provides means for negotiation of clients preferred language
30 and charset, as well as a convenient way to send any arbitrary data
31 with caching and resuming capabilities.
32
33 It provides powerful request functionality, if built with CURL
34 support. Parallel requests are available for PHP 5 and greater.
35
36 Currently implemented features include:
37 - Building absolute URIs
38 - RFC compliant HTTP redirects
39 - RFC compliant HTTP date handling
40 - Parsing of HTTP headers and messages
41 - Caching by "Last-Modified" and/or ETag (with 'on the fly' option for
42   ETag generation from buffered output)
43 - Sending data/files/streams with (multiple) ranges support
44 - Negotiating user preferred language/charset
45 - Convenient request functions to HEAD/GET/POST if libcurl is
46   available
47 - HTTP auth hooks (Basic)
48 - PHP5 classes: HttpUtil, HttpResponse, HttpRequest, HttpRequestPool,
49   HttpMessage
50
51 In PECL status of this extension is: %{_status}.
52
53 %description -l pl
54 To rozszerzenie HTTP ma na celu dostarczenie wygodnego i potê¿nego
55 zestawu funkcjonalno¶ci do jednego z najwa¿niejszych zastosowañ PHP.
56
57 U³atwia obs³ugê adresów HTTP, dat, przekierowañ, nag³ówków i
58 wiadmo¶ci, dostarcza sposób do negocjacji preferowana jêzyka i strony
59 kodowej klienta, jak równie¿ wygodnego sposobu do wysy³ania dowolnego
60 rodzaju danych z mo¿liwo¶ci± keszowania oraz wznawiania transferów.
61
62 Rozszerzenie dostracza potê¿ne mo¿liwo¶ci zapytañ, je¶li zbudowane
63 jest ze wsparciem dla CURL. Równoleg³e zapytania s± dostêpne od wersji
64 PHP 5.
65
66 Aktualnie zaimplementowane mo¿liwo¶ci to miêdzy innymi:
67 - tworzenie bezwzglêdnych URI
68 - zgodne z RFC przekierowania HTTP
69 - zgodna z RFC obs³uga daty HTTP
70 - przetwarzanie nag³ówków i wiadomo¶ci HTTP
71 - buforowanie z u¿yciem "Last-Modified" i/lub ETagów (z opcjê
72   generowania "w locie" ETagów z buforowanego wyj¶cia)
73 - wysy³anie danych/plików/strumieni z obs³ug± (wielu) przedzia³ów
74 - negocjacja preferowanego przez u¿ytkownika jêzyka/zestawu znaków
75 - wygodne funkcje do ¿±dañ HEAD/GET/POST je¶li dostêpna jest libcurl
76 - wywo³ania HTTP auth (Basic)
77 - klasy PHP5: HttpUtil, HttpResponse, HttpRequest, HttpRequestPool,
78   HttpMessage
79
80 To rozszerzenie ma w PECL status: %{_status}.
81
82 %prep
83 %setup -q -c
84
85 %build
86 cd %{_fmodname}-%{version}
87 phpize
88 %configure
89 %{__make}
90
91 %install
92 rm -rf $RPM_BUILD_ROOT
93 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
94
95 install %{_fmodname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}/%{_modname}.so
96 cat << 'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
97 ; Enable %{_modname} extension module
98 extension=%{_modname}.so
99 EOF
100
101 %clean
102 rm -rf $RPM_BUILD_ROOT
103
104 %post
105 [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
106 [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
107
108 %postun
109 if [ "$1" = 0 ]; then
110         [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
111         [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
112 fi
113
114 %files
115 %defattr(644,root,root,755)
116 %doc %{_fmodname}-%{version}/{KnownIssues.txt,docs}
117 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
118 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
This page took 0.065629 seconds and 4 git commands to generate.