]>
Commit | Line | Data |
---|---|---|
9212a2fd ER |
1 | # NOTE |
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 | |
7 | Name: ZendDebugger | |
8 | Version: 5.2.10 | |
9 | Release: 0.4 | |
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 | |
14 | NoSource: 0 | |
15 | Source1: http://downloads.zend.com/pdt/server-debugger/%{name}-%{version}-linux-glibc23-x86_64.tar.gz | |
16 | # NoSource1-md5: 3238904ebd1accd5795a50fb88fc6fff | |
17 | NoSource: 1 | |
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) | |
22 | ||
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 | |
30 | ||
31 | %description | |
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. | |
35 | ||
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. | |
39 | ||
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 | |
47 | ||
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. | |
52 | ||
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. | |
56 | ||
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 | |
64 | ||
65 | %description -n php-%{name} | |
66 | ZendStudioServer for PHP 5.x. | |
67 | ||
68 | %description -n php-%{name} -l pl.UTF-8 | |
69 | ZendStudioServer dla PHP 5.x. | |
70 | ||
71 | %prep | |
72 | %setup -qcT | |
73 | %ifarch %{x8664} | |
74 | tar --strip-components=1 -xzf %{SOURCE1} | |
75 | %else | |
76 | tar --strip-components=1 -xzf %{SOURCE0} | |
77 | %endif | |
78 | ||
79 | cat > zend.ini <<EOF | |
80 | [Zend] | |
81 | zend_debugger.allow_hosts=127.0.0.1 | |
82 | zend_debugger.expose_remotely=always | |
83 | EOF | |
84 | ||
85 | cat <<'EOF' > pack4.ini | |
86 | ; %{name} package settings. Overwritten with each upgrade. | |
87 | ; if you need to add options, edit %{name}.ini instead | |
88 | [Zend] | |
89 | zend_extension=%{_php4_extensiondir}/ZendDebugger.so | |
90 | EOF | |
91 | ||
92 | cat <<'EOF' > pack5.ini | |
93 | ; %{name} package settings. Overwritten with each upgrade. | |
94 | ; if you need to add options, edit %{name}.ini instead | |
95 | [Zend] | |
96 | zend_extension=%{_php5_extensiondir}/ZendDebugger.so | |
97 | EOF | |
98 | ||
99 | %install | |
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} | |
104 | ||
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 | |
110 | ||
111 | %clean | |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
114 | %preun -n php4-%{name} | |
115 | if [ "$1" = "0" ]; then | |
116 | %php4_webserver_restart | |
117 | fi | |
118 | ||
119 | %post -n php4-%{name} | |
120 | %php4_webserver_restart | |
121 | ||
122 | %preun -n php-%{name} | |
123 | if [ "$1" = "0" ]; then | |
124 | %php_webserver_restart | |
125 | fi | |
126 | ||
127 | %post -n php-%{name} | |
128 | %php_webserver_restart | |
129 | ||
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 | |
135 | ||
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 |