- 3.2.2 - Zend Optimizer 3 with full support for PHP 5.2
[packages/ZendGuardLoader.git] / ZendGuardLoader.spec
CommitLineData
5a74951f 1# DO NOT MODIFY CONTENTS OF PACKAGE - AGAINST LICENSE AND MAKES IT UNDISTRIBUTABLE
6e34f38c 2# AND ALSO IT IS ALREADY STRIPPED.
3
4%define no_install_post_strip 1
5%define no_install_post_compress_docs 1
6%define no_install_post_chrpath 1
5d40dd5f 7Summary: Zend Optimizer - PHP code optimizer
8Summary(pl): Zend Optimizer - optymalizator kodu PHP
ef055b0a 9Name: ZendOptimizer
da99ab66
ER
10Version: 3.2.2
11Release: 1
6e34f38c 12License: Zend License, distributable only if unmodified and for free (see LICENSE)
ef055b0a 13Group: Libraries
da99ab66
ER
14Source0: http://downloads.zend.com/optimizer/3.2.2/%{name}-%{version}-linux-glibc21-i386.tar.gz
15# Source0-md5: 05bf2c306a8e16c1430d691f83f1054a
16Source1: http://downloads.zend.com/optimizer/3.2.2/%{name}-%{version}-linux-glibc23-x86_64.tar.gz
17# Source1-md5: 0e3a0901f6e9ef2a549100db2531c7fa
18URL: http://www.zend.com/products/zend_optimizer
7506c84b 19BuildRequires: rpmbuild(macros) >= 1.344
675c3d75 20BuildRequires: tar >= 1:1.15.1
675c3d75 21Requires(triggerpostun): sed >= 4.0
fe31c67f 22ExclusiveArch: %{ix86} %{x8664}
ef055b0a 23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%description
e4ce32ec 26Zend Optimizer - PHP code optimizer.
ef055b0a 27
28%description -l pl
e4ce32ec 29Zend Optimizer - optymalizator kodu PHP.
ef055b0a 30
675c3d75 31%package -n php4-%{name}
eadf622e
JB
32Summary: Zend Optimizer for PHP 4.x
33Summary(pl): Zend Optimizer dla PHP 4.x
675c3d75
ER
34Group: Libraries
35Requires: %{name} = %{version}-%{release}
7506c84b 36Requires: php4-common >= 3:4.4.0-3
675c3d75
ER
37
38%description -n php4-%{name}
39Zend Optimizer for PHP 4.x.
40
eadf622e
JB
41%description -n php4-%{name} -l pl
42Zend Optimizer dla PHP 4.x.
43
675c3d75 44%package -n php-%{name}
eadf622e
JB
45Summary: Zend Optimizer for PHP 5.x
46Summary(pl): Zend Optimizer dla PHP 5.x
675c3d75
ER
47Group: Libraries
48Requires: %{name} = %{version}-%{release}
7506c84b 49Requires: php-common >= 4:5.0.4
675c3d75
ER
50
51%description -n php-%{name}
52Zend Optimizer for PHP 5.x.
eadf622e
JB
53
54%description -n php-%{name} -l pl
55Zend Optimizer dla PHP 5.x.
675c3d75 56
ef055b0a 57%prep
6e34f38c 58%setup -q -c
59
60%ifarch %{ix86}
675c3d75 61%{__tar} --strip-components=1 -zxf %{SOURCE0}
6e34f38c 62%endif
fe31c67f 63%ifarch %{x8664}
675c3d75 64%{__tar} --strip-components=1 -zxf %{SOURCE1}
6e34f38c 65%endif
ef055b0a 66
67%install
68rm -rf $RPM_BUILD_ROOT
675c3d75 69install -d $RPM_BUILD_ROOT{%{_bindir},/etc/php4,/etc/php}
6e34f38c 70
71cd data
675c3d75
ER
72for a in *_comp; do
73 d=$(basename $a _comp | tr _ .)
74 install -D $a/ZendOptimizer.so $RPM_BUILD_ROOT%{_libdir}/Zend/lib/Optimizer-%{version}/php-$d/ZendOptimizer.so
75done
76for a in *_comp/TS; do
77 d=$(basename $(dirname $a) _comp | tr _ .)
78 install -D $a/ZendOptimizer.so $RPM_BUILD_ROOT%{_libdir}/Zend/lib/Optimizer_TS-%{version}/php-$d/ZendOptimizer.so
79done
80
6e34f38c 81install zendid $RPM_BUILD_ROOT%{_bindir}
82install poweredbyoptimizer.gif $RPM_BUILD_ROOT%{_sysconfdir}/php
675c3d75 83install poweredbyoptimizer.gif $RPM_BUILD_ROOT%{_sysconfdir}/php4
6e34f38c 84install *.so $RPM_BUILD_ROOT%{_libdir}/Zend/lib
675c3d75 85ln -s %{_sysconfdir}/php $RPM_BUILD_ROOT%{_libdir}/Zend/etc
047fc85c 86ln -s %{_bindir} $RPM_BUILD_ROOT%{_libdir}/Zend/bin
ef055b0a 87
675c3d75
ER
88cat <<'EOF' > zendoptimizer.ini
89; ZendOptimizer user settings.
90[Zend]
91zend_optimizer.optimization_level=15
92EOF
93
94cat <<'EOF' > pack.ini
8054e742 95; ZendOptimizer package settings. Overwritten with each upgrade.
675c3d75
ER
96; if you need to add options, edit %{name}.ini instead
97[Zend]
98zend_optimizer.version=%{version}
99zend_extension_manager.optimizer=%{_libdir}/Zend/lib/Optimizer-%{version}
100zend_extension_manager.optimizer_ts=%{_libdir}/Zend/lib/Optimizer_TS-%{version}
101zend_extension=%{_libdir}/Zend/lib/ZendExtensionManager.so
102zend_extension_ts=%{_libdir}/Zend/lib/ZendExtensionManager_TS.so
103EOF
104
105install -d $RPM_BUILD_ROOT%{_sysconfdir}/php{,4}/conf.d
106install zendoptimizer.ini $RPM_BUILD_ROOT/etc/php4/conf.d/%{name}.ini
107install zendoptimizer.ini $RPM_BUILD_ROOT/etc/php/conf.d/%{name}.ini
108install pack.ini $RPM_BUILD_ROOT/etc/php4/conf.d/%{name}_pack.ini
109install pack.ini $RPM_BUILD_ROOT/etc/php/conf.d/%{name}_pack.ini
110
69133cfa
JB
111%clean
112rm -rf $RPM_BUILD_ROOT
113
675c3d75
ER
114%preun -n php4-%{name}
115if [ "$1" = "0" ]; then
7506c84b 116 %php4_webserver_restart
675c3d75
ER
117fi
118
119%post -n php4-%{name}
120# let /usr/lib/Zend/etc point to php's config dir. php which installed first wins.
121# not sure how critical is existence of this etc link at all.
122if [ ! -L %{_libdir}/Zend/etc ]; then
123 ln -snf /etc/php4 %{_libdir}/Zend/etc
124fi
7506c84b 125%php4_webserver_restart
6e34f38c 126
675c3d75 127%preun -n php-%{name}
5a74951f 128if [ "$1" = "0" ]; then
7506c84b 129 %php_webserver_restart
ef055b0a 130fi
131
675c3d75
ER
132%post -n php-%{name}
133# let /usr/lib/Zend/etc point to php's config dir. php which installed first wins.
134# not sure how critical is existence of this etc link at all.
135if [ ! -L %{_libdir}/Zend/etc ]; then
136 ln -snf /etc/php %{_libdir}/Zend/etc
137fi
7506c84b 138%php_webserver_restart
5a74951f 139
675c3d75
ER
140%post
141if [ "$1" = 1 ]; then
142%banner -e %{name} <<EOF
143Remember to read %{_docdir}/%{name}-%{version}/LICENSE.gz!
144EOF
ef055b0a 145fi
675c3d75
ER
146
147%triggerpostun -n php4-%{name} -- %{name} < 2.5.10a-0.20
148if [ -f /etc/php4/php.ini ]; then
149 cp -f /etc/php4/conf.d/ZendOptimizer.ini{,.rpmnew}
150 sed -ne '/^\(zend_\|\[Zend\]\)/{/^zend_extension\(_manager\.optimizer\)\?\(_ts\)\?=/d;p}' /etc/php4/php.ini > /etc/php4/conf.d/ZendOptimizer.ini
151 cp -f /etc/php4/php.ini{,.rpmsave}
152 sed -i -e '/^\(zend_\|\[Zend\]\)/d' /etc/php4/php.ini
ef055b0a 153fi
6e34f38c 154
675c3d75
ER
155%triggerpostun -- %{name} < 2.5.10a-0.20
156if [ -f /etc/php/php.ini ]; then
157 cp -f /etc/php/conf.d/ZendOptimizer.ini{,.rpmnew}
158 sed -ne '/^\(zend_\|\[Zend\]\)/{/^zend_extension\(_manager\.optimizer\)\?\(_ts\)\?=/d;p}' /etc/php/php.ini > /etc/php/conf.d/ZendOptimizer.ini
159 cp -f /etc/php/php.ini{,.rpmsave}
160 sed -i -e '/^\(zend_\|\[Zend\]\)/d' /etc/php/php.ini
161fi
ef055b0a 162
ef055b0a 163%files
164%defattr(644,root,root,755)
675c3d75 165%doc data/doc/* LICENSE
6e34f38c 166%attr(755,root,root) %{_bindir}/zendid
6e34f38c 167%dir %{_libdir}/Zend
675c3d75 168%dir %{_libdir}/Zend/lib
5a74951f 169%dir %{_libdir}/Zend/lib/Optimizer-%{version}
675c3d75 170%dir %{_libdir}/Zend/lib/Optimizer-%{version}/php-*
5a74951f 171%dir %{_libdir}/Zend/lib/Optimizer_TS-%{version}
675c3d75
ER
172%dir %{_libdir}/Zend/lib/Optimizer_TS-%{version}/php-*
173%attr(755,root,root) %{_libdir}/Zend/lib/Optimizer-%{version}/php-*/ZendOptimizer.so
174%attr(755,root,root) %{_libdir}/Zend/lib/Optimizer_TS-%{version}/php-*/ZendOptimizer.so
175%attr(755,root,root) %{_libdir}/Zend/lib/ZendExtensionManager.so
176%attr(755,root,root) %{_libdir}/Zend/lib/ZendExtensionManager_TS.so
6e34f38c 177%{_libdir}/Zend/bin
675c3d75
ER
178%ghost %{_libdir}/Zend/etc
179
180%files -n php4-%{name}
181%defattr(644,root,root,755)
182%config(noreplace) %verify(not md5 mtime size) /etc/php4/conf.d/%{name}.ini
183%config %verify(not md5 mtime size) /etc/php4/conf.d/%{name}_pack.ini
184/etc/php4/poweredbyoptimizer.gif
185
186%files -n php-%{name}
187%defattr(644,root,root,755)
188%config(noreplace) %verify(not md5 mtime size) /etc/php/conf.d/%{name}.ini
189%config %verify(not md5 mtime size) /etc/php/conf.d/%{name}_pack.ini
190/etc/php/poweredbyoptimizer.gif
This page took 0.17478 seconds and 4 git commands to generate.