]>
Commit | Line | Data |
---|---|---|
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 | |
07f78484 AM |
7 | Summary: Zend Guard - PHP code guard |
8 | Summary(pl.UTF-8): Zend Guard - optymalizator kodu PHP | |
9 | Name: ZendGuardLoader | |
10 | Version: 5.5.0 | |
8eee1461 | 11 | Release: 1 |
6e34f38c | 12 | License: Zend License, distributable only if unmodified and for free (see LICENSE) |
ef055b0a | 13 | Group: Libraries |
07f78484 AM |
14 | Source0: http://downloads.zend.com/guard/5.5.0/%{name}-php-5.3-linux-glibc23-i386.tar.gz |
15 | # Source0-md5: f53e51ecb59e390be5551ff7cc8576b0 | |
16 | Source1: http://downloads.zend.com/guard/5.5.0/%{name}-php-5.3-linux-glibc23-x86_64.tar.gz | |
17 | # Source1-md5: 9408297e9e38d5ce2cca92c619b5ad50 | |
18 | URL: http://www.zend.com/products/zend_guard | |
7506c84b | 19 | BuildRequires: rpmbuild(macros) >= 1.344 |
675c3d75 | 20 | BuildRequires: tar >= 1:1.15.1 |
92dea4ad AM |
21 | BuildRequires: php%{?php_suffix}-devel >= 4:5.3 |
22 | BuildRequires: php%{?php_suffix}-devel < 4:5.4 | |
675c3d75 | 23 | Requires(triggerpostun): sed >= 4.0 |
fe31c67f | 24 | ExclusiveArch: %{ix86} %{x8664} |
ef055b0a | 25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %description | |
07f78484 | 28 | Zend Guard - PHP code guard. |
ef055b0a | 29 | |
7461c8a2 | 30 | %description -l pl.UTF-8 |
07f78484 | 31 | Zend Guard - optymalizator kodu PHP. |
eadf622e | 32 | |
037ac375 | 33 | %package -n php%{?php_suffix}-%{name} |
07f78484 AM |
34 | Summary: Zend Guard for PHP 5.x |
35 | Summary(pl.UTF-8): Zend Guard dla PHP 5.x | |
675c3d75 ER |
36 | Group: Libraries |
37 | Requires: %{name} = %{version}-%{release} | |
037ac375 AM |
38 | Requires: php%{?php_suffix}-common >= 4:5.3 |
39 | Requires: php%{?php_suffix}-common < 4:5.4 | |
675c3d75 | 40 | |
037ac375 | 41 | %description -n php%{?php_suffix}-%{name} |
07f78484 | 42 | Zend Guard for PHP 5.x. |
eadf622e | 43 | |
037ac375 | 44 | %description -n php%{?php_suffix}-%{name} -l pl.UTF-8 |
07f78484 | 45 | Zend Guard dla PHP 5.x. |
675c3d75 | 46 | |
ef055b0a | 47 | %prep |
6e34f38c | 48 | %setup -q -c |
49 | ||
50 | %ifarch %{ix86} | |
675c3d75 | 51 | %{__tar} --strip-components=1 -zxf %{SOURCE0} |
6e34f38c | 52 | %endif |
fe31c67f | 53 | %ifarch %{x8664} |
675c3d75 | 54 | %{__tar} --strip-components=1 -zxf %{SOURCE1} |
6e34f38c | 55 | %endif |
ef055b0a | 56 | |
d02b5b44 AM |
57 | cat <<'EOF' > zendguardloader.ini |
58 | ; ZendGuardLoader user settings. | |
b1be7adf | 59 | [Zend] |
d02b5b44 AM |
60 | zend_loader.enable=1 |
61 | ;zend_loader.disable_licensing=0 | |
62 | ;zend_loader.obfuscation_level_support=3 | |
63 | ;zend_loader.license_path= | |
b1be7adf ER |
64 | EOF |
65 | ||
d02b5b44 AM |
66 | cat <<'EOF' > zendguardloaderpack.ini |
67 | ; ZendGuardLoader package settings. Overwritten with each upgrade. | |
b1be7adf ER |
68 | ; if you need to add options, edit %{name}.ini instead |
69 | [Zend] | |
07f78484 | 70 | zend_guard.version=%{version} |
8eee1461 | 71 | zend_extension=%{_libdir}/Zend/lib/GuardLoader-%{version}/php-5.3.x/ZendGuardLoader.so |
b1be7adf ER |
72 | EOF |
73 | ||
ef055b0a | 74 | %install |
75 | rm -rf $RPM_BUILD_ROOT | |
07f78484 AM |
76 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}/php} |
77 | ||
8eee1461 AM |
78 | for d in php-*; do |
79 | install -D $d/ZendGuardLoader.so $RPM_BUILD_ROOT%{_libdir}/Zend/lib/GuardLoader-%{version}/$d/ZendGuardLoader.so | |
80 | done | |
81 | ||
037ac375 | 82 | ln -s %{_sysconfdir}/php%{?php_suffix} $RPM_BUILD_ROOT%{_libdir}/Zend%{_sysconfdir} |
ef055b0a | 83 | |
037ac375 AM |
84 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/php%{?php_suffix}/conf.d |
85 | install zendguardloader.ini $RPM_BUILD_ROOT%{_sysconfdir}/php%{?php_suffix}/conf.d/zendguardloader.ini | |
86 | install zendguardloaderpack.ini $RPM_BUILD_ROOT%{_sysconfdir}/php%{?php_suffix}/conf.d/zendguardloader_pack.ini | |
675c3d75 | 87 | |
69133cfa JB |
88 | %clean |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
037ac375 | 91 | %preun -n php%{?php_suffix}-%{name} |
5a74951f | 92 | if [ "$1" = "0" ]; then |
7506c84b | 93 | %php_webserver_restart |
ef055b0a | 94 | fi |
95 | ||
037ac375 | 96 | %post -n php%{?php_suffix}-%{name} |
07f78484 | 97 | # let %{_prefix}/lib/Zend%{_sysconfdir} point to php's config dir. php which installed first wins. |
675c3d75 | 98 | # not sure how critical is existence of this etc link at all. |
07f78484 | 99 | if [ ! -L %{_libdir}/Zend%{_sysconfdir} ]; then |
037ac375 | 100 | ln -snf %{_sysconfdir}/php%{?php_suffix} %{_libdir}/Zend%{_sysconfdir} |
675c3d75 | 101 | fi |
7506c84b | 102 | %php_webserver_restart |
5a74951f | 103 | |
8eee1461 | 104 | #%%post |
d02b5b44 | 105 | #if [ "$1" = 1 ]; then |
8eee1461 | 106 | #%%banner -e %{name} <<EOF |
d02b5b44 AM |
107 | #Remember to read %{_docdir}/%{name}-%{version}/LICENSE.gz! |
108 | #EOF | |
109 | #fi | |
ef055b0a | 110 | |
ef055b0a | 111 | %files |
112 | %defattr(644,root,root,755) | |
d02b5b44 | 113 | %doc README.txt |
6e34f38c | 114 | %dir %{_libdir}/Zend |
675c3d75 | 115 | %dir %{_libdir}/Zend/lib |
d02b5b44 AM |
116 | %dir %{_libdir}/Zend/lib/GuardLoader-%{version} |
117 | %dir %{_libdir}/Zend/lib/GuardLoader-%{version}/php-* | |
118 | %attr(755,root,root) %{_libdir}/Zend/lib/GuardLoader-%{version}/php-*/ZendGuardLoader.so | |
07f78484 | 119 | %ghost %{_libdir}/Zend%{_sysconfdir} |
675c3d75 | 120 | |
037ac375 | 121 | %files -n php%{?php_suffix}-%{name} |
675c3d75 | 122 | %defattr(644,root,root,755) |
037ac375 AM |
123 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php%{?php_suffix}/conf.d/zendguardloader.ini |
124 | %config %verify(not md5 mtime size) %{_sysconfdir}/php%{?php_suffix}/conf.d/zendguardloader_pack.ini |