SPECS: ZendStudioServer.spec - finish .ini files

glen glen at pld-linux.org
Mon Nov 14 11:35:00 CET 2005


Author: glen                         Date: Mon Nov 14 10:35:00 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- finish .ini files

---- Files affected:
SPECS:
   ZendStudioServer.spec (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: SPECS/ZendStudioServer.spec
diff -u SPECS/ZendStudioServer.spec:1.5 SPECS/ZendStudioServer.spec:1.6
--- SPECS/ZendStudioServer.spec:1.5	Mon Nov 14 11:24:00 2005
+++ SPECS/ZendStudioServer.spec	Mon Nov 14 11:34:55 2005
@@ -3,7 +3,7 @@
 Summary(pl):	ZendStudioServer - narzędzia zarządzające dla serwerów WWW opartych na PHP
 Name:		ZendStudioServer
 Version:	5.0.0
-Release:	0.1
+Release:	0.3
 Epoch:		0
 License:	Zend Studio License
 Group:		Applications
@@ -14,7 +14,10 @@
 # NoSource1-md5:	dbb459de43cf1492404b140b9f33e0a4
 NoSource:	1
 BuildRequires:	tar >= 1:1.15.1
-Requires:	ZendOptimizer
+# circular dependency, so ones upgraded are forced to choose php and
+# ones that want to install specific for specific version need not to
+# install ZendStudioServer separately
+Requires:	%{name}(php) = %{version}-%{release}
 ExclusiveArch:	%{ix86} %{x8664}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -34,6 +37,34 @@
 integrację jednocześnie upraszczając konfiguracje PHP ze zdalną
 diagnostyką oraz zarządzanie bezpieczeństwem.
 
+%package -n php4-%{name}
+Summary:	ZendStudioServer for PHP 4.x
+Summary(pl):	ZendStudioServer dla PHP 4.x
+Group:		Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	php4-ZendOptimizer
+Provides:	%{name}(php) = %{version}-%{release}
+
+%description -n php4-%{name}
+ZendStudioServer for PHP 4.x.
+
+%description -n php4-%{name} -l pl
+ZendStudioServer dla PHP 4.x.
+
+%package -n php-%{name}
+Summary:	ZendStudioServer for PHP 5.x
+Summary(pl):	ZendStudioServer dla PHP 5.x
+Group:		Libraries
+Requires:	%{name} = %{version}-%{release}
+Requires:	php-ZendOptimizer
+Provides:	%{name}(php) = %{version}-%{release}
+
+%description -n php-%{name}
+ZendStudioServer for PHP 5.x.
+
+%description -n php-%{name} -l pl
+ZendStudioServer dla PHP 5.x.
+
 %prep
 %setup -qcT
 %ifarch %{x8664}
@@ -85,18 +116,41 @@
 zend_extension_manager.debug_server_ts=%{_libdir}/Zend/lib/Debugger_TS-%{version}
 EOF
 
-install zend.ini $RPM_BUILD_ROOT%{_libdir}/Zend/%{name}.ini
-install pack.ini $RPM_BUILD_ROOT%{_libdir}/Zend/%{name}_pack.ini
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/php{,4}/conf.d
+install zend.ini $RPM_BUILD_ROOT/etc/php4/conf.d/%{name}.ini
+install zend.ini $RPM_BUILD_ROOT/etc/php/conf.d/%{name}.ini
+install pack.ini $RPM_BUILD_ROOT/etc/php4/conf.d/%{name}_pack.ini
+install pack.ini $RPM_BUILD_ROOT/etc/php/conf.d/%{name}_pack.ini
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%preun -n php4-%{name}
+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
+
+%post -n php4-%{name}
+[ ! -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 -n php-%{name}
+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
+fi
+
+%post -n php-%{name}
+[ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
+[ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
+
 %files
 %defattr(644,root,root,755)
 %doc README LICENSE LICENSE-PHP
 %attr(755,root,root) %{_bindir}/*
 %attr(755,root,root) %{_sbindir}/*
-%{_datadir}
 
 %dir %{_libdir}/Zend/lib/Debugger-%{version}
 %dir %{_libdir}/Zend/lib/Debugger-%{version}/php-*
@@ -105,7 +159,19 @@
 %attr(755,root,root) %{_libdir}/Zend/lib/Debugger-%{version}/php-*/ZendDebugger.so
 %attr(755,root,root) %{_libdir}/Zend/lib/Debugger_TS-%{version}/php-*/ZendDebugger.so
 %{_libdir}/Zend/lib/tools
-%{_libdir}/Zend/*.ini
+
+# html documents
+%{_datadir}
+
+%files -n php4-%{name}
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) /etc/php4/conf.d/%{name}.ini
+%config %verify(not md5 mtime size) /etc/php4/conf.d/%{name}_pack.ini
+
+%files -n php-%{name}
+%defattr(644,root,root,755)
+%config(noreplace) %verify(not md5 mtime size) /etc/php/conf.d/%{name}.ini
+%config %verify(not md5 mtime size) /etc/php/conf.d/%{name}_pack.ini
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -113,6 +179,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.6  2005/11/14 10:34:55  glen
+- finish .ini files
+
 Revision 1.5  2005/11/14 10:24:00  glen
 - 5.0.0 final (NFY)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/ZendStudioServer.spec?r1=1.5&r2=1.6&f=u




More information about the pld-cvs-commit mailing list