]> git.pld-linux.org Git - packages/php-pecl-http.git/blobdiff - php-pecl-http.spec
- move %define calls to the top of the file
[packages/php-pecl-http.git] / php-pecl-http.spec
index a9781170403f191a4af3da3afbc72acd948ebdc8..a88292f5dd9a6a9ae062e350d43a7bf7b26300b4 100644 (file)
@@ -1,39 +1,39 @@
 %define                _modname        http
 %define                _fmodname       pecl_http
 %define                _status         beta
+%define                _sysconfdir     /etc/php
+%define                extensionsdir   %(php-config --extension-dir 2>/dev/null)
 
 Summary:       %{_modname} - extended HTTP support
 Summary(pl):   %{_modname} - rozszerzona obs³uga protoko³u HTTP
 Name:          php-pecl-%{_modname}
-Version:       0.7.0
+Version:       0.12.0
 Release:       1
 License:       PHP 3.0
 Group:         Development/Languages/PHP
 Source0:       http://pecl.php.net/get/%{_fmodname}-%{version}.tgz
-# Source0-md5: c9e24ea9be29871fc30b7fea9caa8eaa
+# Source0-md5: d180e5b95d22c911e40d8265f7c8fd96
 URL:           http://pecl.php.net/package/pecl_http/
 BuildRequires: libtool
 BuildRequires: php-devel >= 3:5.0.0
-Requires:      php-common >= 3:5.0.0
+Requires:      %{_sysconfdir}/conf.d
+%requires_eq_to php-common php-devel
 Obsoletes:     php-pear-%{_modname}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _sysconfdir     /etc/php
-%define                extensionsdir   %{_libdir}/php
-
 %description
 Currently implemented features:
 - Building absolute URIs
 - RFC compliant HTTP redirects
 - RFC compliant HTTP date handling
-- Parsing of HTTP headers and responses
+- Parsing of HTTP headers and messages
 - Caching by "Last-Modified" and/or ETag (with 'on the fly' option for
   ETag generation from buffered output)
 - Sending data/files/streams with (multiple) ranges support
 - Negotiating user preferred language/charset
 - Convenient request functions to HEAD/GET/POST if libcurl is available
 - HTTP auth hooks (Basic)
-- HTTPi, HTTPi_Response and HTTPi_Request (with libcurl) classes
+- PHP5 classes: HttpUtil, HttpResponse, HttpRequest, HttpRequestPool, HttpMessage
 
 In PECL status of this extension is: %{_status}.
 
@@ -42,14 +42,14 @@ Aktualnie zaimplementowane mo
 - tworzenie bezwzglêdnych URI
 - zgodne z RFC przekierowania HTTP
 - zgodna z RFC obs³uga daty HTTP
-- przetwarzanie nag³ówków i odpowiedzi HTTP
+- przetwarzanie nag³ówków i wiadomo¶ci HTTP
 - buforowanie z u¿yciem "Last-Modified" i/lub ETagów (z opcjê
   generowania "w locie" ETagów z buforowanego wyj¶cia)
 - wysy³anie danych/plików/strumieni z obs³ug± (wielu) przedzia³ów
 - negocjacja preferowanego przez u¿ytkownika jêzyka/zestawu znaków
 - wygodne funkcje do ¿±dañ HEAD/GET/POST je¶li dostêpna jest libcurl
 - wywo³ania HTTP auth (Basic)
-- klasy HTTPi, HTTPi_Response i HTTPi_Request (z u¿yciem libcurl)
+- klasy PHP5: HttpUtil, HttpResponse, HttpRequest, HttpRequestPool, HttpMessage
 
 To rozszerzenie ma w PECL status: %{_status}.
 
@@ -64,22 +64,29 @@ phpize
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{extensionsdir}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
 
 install %{_fmodname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}/%{_modname}.so
+cat << 'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
+; Enable %{_modname} extension module
+extension=%{_modname}.so
+EOF
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-%{_sbindir}/php-module-install install %{_modname} %{_sysconfdir}/php-cgi.ini
+[ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
+[ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
 
-%preun
-if [ "$1" = "0" ]; then
-       %{_sbindir}/php-module-install remove %{_modname} %{_sysconfdir}/php-cgi.ini
+%postun
+if [ "$1" = 0 ]; then
+        [ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
+        [ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
 fi
 
 %files
 %defattr(644,root,root,755)
 %doc %{_fmodname}-%{version}/{docs,EXPERIMENTAL}
+%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/%{_modname}.ini
 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
This page took 0.076595 seconds and 4 git commands to generate.