]> git.pld-linux.org Git - packages/php-pecl-http.git/commitdiff
- use new php extension related macros
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 28 Dec 2006 13:41:15 +0000 (13:41 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    php-pecl-http.spec -> 1.26

php-pecl-http.spec

index db841ec165b4fb8e76131f3b65a56d116b23a26e..562a5ca327f24f9a4fe9802203f7371d9c7101cb 100644 (file)
@@ -1,9 +1,6 @@
 %define                _modname        http
 %define                _fmodname       pecl_http
 %define                _status         stable
-%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}
@@ -17,10 +14,10 @@ URL:                http://pecl.php.net/package/pecl_http/
 BuildRequires: curl-devel >= 7.12.3
 BuildRequires: openssl-devel
 BuildRequires: php-devel >= 3:5.0.0
-BuildRequires: rpmbuild(macros) >= 1.322
+BuildRequires: rpmbuild(macros) >= 1.344
 BuildRequires: zlib-devel >= 1.2.0.4
-Requires:      %{_sysconfdir}/conf.d
 %{?requires_php_extension}
+Requires:      php-common >= 4:5.0.4
 Obsoletes:     php-pear-%{_modname}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -94,10 +91,10 @@ phpize
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
+install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
 
-install %{_fmodname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}/%{_modname}.so
-cat << 'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
+install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini
 ; Enable %{_modname} extension module
 extension=%{_modname}.so
 EOF
@@ -106,17 +103,15 @@ EOF
 rm -rf $RPM_BUILD_ROOT
 
 %post
-[ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
-[ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
+%php_webserver_restart
 
 %postun
 if [ "$1" = 0 ]; then
-        [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
-        [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
+       %php_webserver_restart
 fi
 
 %files
 %defattr(644,root,root,755)
 %doc %{_fmodname}-%{version}/{KnownIssues.txt,docs}
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
-%attr(755,root,root) %{extensionsdir}/%{_modname}.so
+%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini
+%attr(755,root,root) %{php_extensiondir}/%{_modname}.so
This page took 0.137834 seconds and 4 git commands to generate.