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