]> git.pld-linux.org Git - packages/php-pecl-mono.git/commitdiff
- use new php extension related macros
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 2 Jan 2007 19:52:19 +0000 (19:52 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    php-pecl-mono.spec -> 1.14

php-pecl-mono.spec

index 521df531789cc5259bd181a93f3c7c75e0316ea7..125eda953426510c2f9d2eb0d91c2d2d1da4d7aa 100644 (file)
@@ -1,9 +1,8 @@
 # TODO
 # - doesn't compile
+# - package examples into examplesdir
 %define                _modname        mono
 %define                _status         beta
-%define                _sysconfdir     /etc/php
-%define                extensionsdir   %(php-config --extension-dir 2>/dev/null)
 Summary:       Allows you to access .NET assemblies from PHP
 Summary(pl):   Pozwala na dostêp do wstawek .NET w PHP
 Name:          php-pecl-%{_modname}
@@ -16,9 +15,9 @@ Source0:      http://pecl.php.net/get/%{_modname}-%{version}.tgz
 URL:           http://pecl.php.net/package/mono/
 BuildRequires: mono-devel
 BuildRequires: php-devel >= 3:5.0.0
-BuildRequires: rpmbuild(macros) >= 1.322
+BuildRequires: rpmbuild(macros) >= 1.344
 %{?requires_php_extension}
-Requires:      %{_sysconfdir}/conf.d
+Requires:      php-common >= 4:5.0.4
 Obsoletes:     php-mono
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -49,10 +48,10 @@ CPPFLAGS="-DHAVE_CONFIG_H -I%{_prefix}/X11R6/include/X11/" \
 
 %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 %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
-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
@@ -61,17 +60,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 %{_modname}-%{version}/examples/{*.php,*.jpg,*.gif}
-%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.090216 seconds and 4 git commands to generate.