1 # DO NOT MODIFY CONTENTS OF PACKAGE - AGAINST LICENSE AND MAKES IT UNDISTRIBUTABLE
2 # AND ALSO IT IS ALREADY STRIPPED.
4 %define no_install_post_strip 1
5 %define no_install_post_compress_docs 1
6 %define no_install_post_chrpath 1
7 Summary: Zend Guard - PHP code guard
8 Summary(pl.UTF-8): Zend Guard - optymalizator kodu PHP
12 License: Zend License, distributable only if unmodified and for free (see LICENSE)
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
19 URL: http://www.zend.com/products/zend_guard
20 BuildRequires: rpmbuild(macros) >= 1.344
21 BuildRequires: tar >= 1:1.15.1
22 Requires(triggerpostun): sed >= 4.0
23 ExclusiveArch: %{ix86} %{x8664}
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 Zend Guard - PHP code guard.
29 %description -l pl.UTF-8
30 Zend Guard - optymalizator kodu PHP.
32 %package -n php%{?php_suffix}-%{name}
33 Summary: Zend Guard for PHP 5.x
34 Summary(pl.UTF-8): Zend Guard dla PHP 5.x
36 Requires: %{name} = %{version}-%{release}
37 Requires: php%{?php_suffix}-common >= 4:5.4
38 Requires: php%{?php_suffix}-common < 4:5.5
40 %description -n php%{?php_suffix}-%{name}
41 Zend Guard for PHP 5.x.
43 %description -n php%{?php_suffix}-%{name} -l pl.UTF-8
44 Zend Guard dla PHP 5.x.
50 %{__tar} --strip-components=1 -zxf %{SOURCE0}
53 %{__tar} --strip-components=1 -zxf %{SOURCE1}
56 cat <<'EOF' > zendguardloader.ini
57 ; ZendGuardLoader user settings.
60 ;zend_loader.disable_licensing=0
61 ;zend_loader.obfuscation_level_support=3
62 ;zend_loader.license_path=
65 cat <<'EOF' > zendguardloaderpack.ini
66 ; ZendGuardLoader package settings. Overwritten with each upgrade.
67 ; if you need to add options, edit %{name}.ini instead
69 zend_guard.version=%{version}
70 zend_extension=%{_libdir}/Zend/lib/GuardLoader-%{version}/php-5.4.x/ZendGuardLoader.so
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}/php%{?php_suffix}}
78 install -D $d/ZendGuardLoader.so $RPM_BUILD_ROOT%{_libdir}/Zend/lib/GuardLoader-%{version}/$d/ZendGuardLoader.so
81 ln -s %{_sysconfdir}/php%{?php_suffix} $RPM_BUILD_ROOT%{_libdir}/Zend%{_sysconfdir}
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
88 rm -rf $RPM_BUILD_ROOT
90 %preun -n php%{?php_suffix}-%{name}
91 if [ "$1" = "0" ]; then
92 %php_webserver_restart
95 %post -n php%{?php_suffix}-%{name}
96 # let %{_prefix}/lib/Zend%{_sysconfdir} point to php's config dir. php which installed first wins.
97 # not sure how critical is existence of this etc link at all.
98 if [ ! -L %{_libdir}/Zend%{_sysconfdir} ]; then
99 ln -snf %{_sysconfdir}/php%{?php_suffix} %{_libdir}/Zend%{_sysconfdir}
101 %php_webserver_restart
104 #if [ "$1" = 1 ]; then
105 #%%banner -e %{name} <<EOF
106 #Remember to read %{_docdir}/%{name}-%{version}/LICENSE.gz!
111 %defattr(644,root,root,755)
114 %dir %{_libdir}/Zend/lib
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
118 %ghost %{_libdir}/Zend%{_sysconfdir}
120 %files -n php%{?php_suffix}-%{name}
121 %defattr(644,root,root,755)
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