]>
Commit | Line | Data |
---|---|---|
919731ea AG |
1 | %define _modname http |
2 | %define _fmodname pecl_http | |
a01b0949 | 3 | %define _status stable |
27c68ecd | 4 | %define _sysconfdir /etc/php4 |
1ec7060b | 5 | %define extensionsdir %(php-config --extension-dir 2>/dev/null) |
919731ea | 6 | Summary: %{_modname} - extended HTTP support |
d682d4cc | 7 | Summary(pl.UTF-8): %{_modname} - rozszerzona obsługa protokołu HTTP |
919731ea | 8 | Name: php4-pecl-%{_modname} |
86c38239 | 9 | Version: 1.3.3 |
43401654 | 10 | Release: 3 |
a01b0949 | 11 | License: BSD |
919731ea AG |
12 | Group: Development/Languages/PHP |
13 | Source0: http://pecl.php.net/get/%{_fmodname}-%{version}.tgz | |
86c38239 | 14 | # Source0-md5: 96c16435936eab288d5fdd5750e3f863 |
919731ea | 15 | URL: http://pecl.php.net/package/pecl_http/ |
d97deeb7 | 16 | BuildRequires: php4-devel >= 3:4.3.0 |
eb3294c1 | 17 | BuildRequires: rpmbuild(macros) >= 1.344 |
eb3294c1 | 18 | Requires: php4-common >= 3:4.4.0-3 |
919731ea | 19 | Obsoletes: php-pear-%{_modname} |
9ef5ba72 | 20 | %{?requires_php_extension} |
919731ea AG |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
22 | ||
919731ea | 23 | %description |
a01b0949 AG |
24 | This HTTP extension aims to provide a convenient and powerful set of |
25 | functionality for one of PHPs major applications. | |
26 | ||
27 | It eases handling of HTTP urls, dates, redirects, headers and | |
28 | messages, provides means for negotiation of clients preferred language | |
29 | and charset, as well as a convenient way to send any arbitrary data | |
30 | with caching and resuming capabilities. | |
31 | ||
32 | It provides powerful request functionality, if built with CURL | |
33 | support. Parallel requests are available for PHP 5 and greater. | |
34 | ||
35 | Currently implemented features include: | |
919731ea AG |
36 | - Building absolute URIs |
37 | - RFC compliant HTTP redirects | |
38 | - RFC compliant HTTP date handling | |
39 | - Parsing of HTTP headers and messages | |
40 | - Caching by "Last-Modified" and/or ETag (with 'on the fly' option for | |
41 | ETag generation from buffered output) | |
42 | - Sending data/files/streams with (multiple) ranges support | |
43 | - Negotiating user preferred language/charset | |
d97deeb7 ER |
44 | - Convenient request functions to HEAD/GET/POST if libcurl is |
45 | available | |
919731ea | 46 | - HTTP auth hooks (Basic) |
d97deeb7 ER |
47 | - PHP5 classes: HttpUtil, HttpResponse, HttpRequest, HttpRequestPool, |
48 | HttpMessage | |
919731ea AG |
49 | |
50 | In PECL status of this extension is: %{_status}. | |
51 | ||
5a3b7264 JR |
52 | %description -l pl.UTF-8 |
53 | To rozszerzenie HTTP ma na celu dostarczenie wygodnego i potężnego | |
54 | zestawu funkcjonalności do jednego z najważniejszych zastosowań PHP. | |
a01b0949 | 55 | |
5a3b7264 JR |
56 | Ułatwia obsługę adresów HTTP, dat, przekierowań, nagłówków i |
57 | wiadmości, dostarcza sposób do negocjacji preferowanego języka i | |
58 | strony kodowej klienta, jak również wygodnego sposobu wysyłania | |
59 | dowolnego rodzaju danych z możliwością keszowania oraz wznawiania | |
60 | transferów. | |
a01b0949 | 61 | |
5a3b7264 JR |
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 | |
a01b0949 AG |
64 | PHP 5. |
65 | ||
5a3b7264 JR |
66 | Aktualnie zaimplementowane możliwości to między innymi: |
67 | - tworzenie bezwzględnych URI | |
919731ea | 68 | - zgodne z RFC przekierowania HTTP |
5a3b7264 JR |
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) | |
d97deeb7 ER |
77 | - klasy PHP5: HttpUtil, HttpResponse, HttpRequest, HttpRequestPool, |
78 | HttpMessage | |
919731ea AG |
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 | |
f0ff75df | 93 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}} |
919731ea AG |
94 | |
95 | install %{_fmodname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}/%{_modname}.so | |
f0ff75df AG |
96 | cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini |
97 | ; Enable %{_modname} extension module | |
98 | extension=%{_modname}.so | |
99 | EOF | |
919731ea AG |
100 | |
101 | %clean | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
104 | %post | |
eb3294c1 | 105 | %php4_webserver_restart |
919731ea | 106 | |
f0ff75df AG |
107 | %postun |
108 | if [ "$1" = 0 ]; then | |
eb3294c1 | 109 | %php4_webserver_restart |
919731ea AG |
110 | fi |
111 | ||
112 | %files | |
113 | %defattr(644,root,root,755) | |
a01b0949 | 114 | %doc %{_fmodname}-%{version}/{KnownIssues.txt,docs} |
d97deeb7 | 115 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini |
919731ea | 116 | %attr(755,root,root) %{extensionsdir}/%{_modname}.so |