2 # - Unusable in PLD Linux as our PHP is compiled with ZTS, while this extension is not
3 # - Can't find what Free Download means (http://www.zend.com/free_download/list)
4 %define php4_version 4.4
5 %define php5_version 5.2
6 Summary: The Zend Debug Server enables remote debugging of PHP applications
10 License: Free Download
11 Group: Development/Languages/PHP
12 Source0: http://downloads.zend.com/pdt/server-debugger/%{name}-%{version}-linux-glibc21-i386.tar.gz
13 # NoSource0-md5: d2ee7659c0c8721221696cab5e765936
15 Source1: http://downloads.zend.com/pdt/server-debugger/%{name}-%{version}-linux-glibc23-x86_64.tar.gz
16 # NoSource1-md5: 3238904ebd1accd5795a50fb88fc6fff
18 URL: http://www.zend.com/store/software/zend_studio
19 BuildRequires: tar >= 1:1.15.1
20 ExclusiveArch: %{ix86} %{x8664}
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 %define _datadir %{_prefix}/share/Zend
24 %define no_install_post_strip 1
25 %define no_install_post_chrpath 1
26 %define _php4_extensiondir %{_libdir}/php4
27 %define _php5_extensiondir %{_libdir}/php
28 %define _php4_sysconfdir /etc/php4/conf.d
29 %define _php5_sysconfdir /etc/php/conf.d
32 The Zend Debug Server enables remote debugging of PHP applications. It
33 plugs into a PHP server and allows the Zend Development Environment to
34 control the execution of PHP applications on the server.
36 The Debug Server is designed be deployed safely on production servers.
37 It does not affect server performance and features access-list based
38 security for protecting the server from unauthorized access.
40 %package -n php4-%{name}
41 Summary: Zend Debugger for PHP 4.x
42 Group: Development/Languages/PHP
43 Requires: php4(thread-safety) = 0
44 Requires: php4-common < 3:%(awk 'BEGIN{print %{php4_version} + 0.1}')
45 Requires: php4-common >= 3:%{php4_version}
46 Conflicts: ZendStudioServer <= 5.2.0
48 %description -n php4-%{name}
49 The Zend Debug Server enables remote debugging of PHP applications. It
50 plugs into a PHP server and allows the Zend Development Environment to
51 control the execution of PHP applications on the server.
53 The Debug Server is designed be deployed safely on production servers.
54 It does not affect server performance and features access-list based
55 security for protecting the server from unauthorized access.
57 %package -n php-%{name}
58 Summary: Zend Debugger for PHP 5.x
59 Group: Development/Languages/PHP
60 Requires: php-common < 4:%(awk 'BEGIN{print %{php5_version} + 0.1}')
61 Requires: php-common >= 4:%{php5_version}
62 Requires: php5(thread-safety) = 0
63 Conflicts: ZendStudioServer <= 5.2.0
65 %description -n php-%{name}
66 ZendStudioServer for PHP 5.x.
68 %description -n php-%{name} -l pl.UTF-8
69 ZendStudioServer dla PHP 5.x.
74 tar --strip-components=1 -xzf %{SOURCE1}
76 tar --strip-components=1 -xzf %{SOURCE0}
81 zend_debugger.allow_hosts=127.0.0.1
82 zend_debugger.expose_remotely=always
85 cat <<'EOF' > pack4.ini
86 ; %{name} package settings. Overwritten with each upgrade.
87 ; if you need to add options, edit %{name}.ini instead
89 zend_extension=%{_php4_extensiondir}/ZendDebugger.so
92 cat <<'EOF' > pack5.ini
93 ; %{name} package settings. Overwritten with each upgrade.
94 ; if you need to add options, edit %{name}.ini instead
96 zend_extension=%{_php5_extensiondir}/ZendDebugger.so
100 rm -rf $RPM_BUILD_ROOT
101 install -d $RPM_BUILD_ROOT{%{_php4_extensiondir},%{_php5_extensiondir}}
102 install %(echo %{php4_version} | tr . _)_x_comp/ZendDebugger.so $RPM_BUILD_ROOT%{_php4_extensiondir}
103 install %(echo %{php5_version} | tr . _)_x_comp/ZendDebugger.so $RPM_BUILD_ROOT%{_php5_extensiondir}
105 install -d $RPM_BUILD_ROOT{%{_php4_sysconfdir},%{_php5_sysconfdir}}
106 install zend.ini $RPM_BUILD_ROOT%{_php4_sysconfdir}/%{name}.ini
107 install zend.ini $RPM_BUILD_ROOT%{_php5_sysconfdir}/%{name}.ini
108 install pack4.ini $RPM_BUILD_ROOT%{_php4_sysconfdir}/%{name}_pack.ini
109 install pack5.ini $RPM_BUILD_ROOT%{_php5_sysconfdir}/%{name}_pack.ini
112 rm -rf $RPM_BUILD_ROOT
114 %preun -n php4-%{name}
115 if [ "$1" = "0" ]; then
116 %php4_webserver_restart
119 %post -n php4-%{name}
120 %php4_webserver_restart
122 %preun -n php-%{name}
123 if [ "$1" = "0" ]; then
124 %php_webserver_restart
128 %php_webserver_restart
130 %files -n php4-%{name}
131 %defattr(644,root,root,755)
132 %config(noreplace) %verify(not md5 mtime size) %{_php4_sysconfdir}/%{name}.ini
133 %config %verify(not md5 mtime size) %{_php4_sysconfdir}/%{name}_pack.ini
134 %attr(755,root,root) %{_php4_extensiondir}/ZendDebugger.so
136 %files -n php-%{name}
137 %defattr(644,root,root,755)
138 %config(noreplace) %verify(not md5 mtime size) %{_php5_sysconfdir}/%{name}.ini
139 %config %verify(not md5 mtime size) %{_php5_sysconfdir}/%{name}_pack.ini
140 %attr(755,root,root) %{_php5_extensiondir}/ZendDebugger.so