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