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