]> git.pld-linux.org Git - packages/ZendGuardLoader.git/blame - ZendGuardLoader.spec
- supports php 5.4(+) only
[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
07f78484
AM
7Summary: Zend Guard - PHP code guard
8Summary(pl.UTF-8): Zend Guard - optymalizator kodu PHP
9Name: ZendGuardLoader
08662abe 10Version: 6.0.0
8eee1461 11Release: 1
6e34f38c 12License: Zend License, distributable only if unmodified and for free (see LICENSE)
ef055b0a 13Group: Libraries
08662abe
AM
14# http://mewbies.com/zend_ioncube/zend_guard_direct_download_links.txt
15Source0: http://downloads.zend.com/guard/6.0.0/%{name}-70429-PHP-5.4-linux-glibc23-i386.tar.gz
16# Source0-md5: 9a25ff3c2fa4cb37602ba6d6491e859e
17Source1: http://downloads.zend.com/guard/6.0.0/%{name}-70429-PHP-5.4-linux-glibc23-x86_64.tar.gz
18# Source1-md5: 09d0da0046eb70c3d704db1e0074098e
07f78484 19URL: http://www.zend.com/products/zend_guard
7506c84b 20BuildRequires: rpmbuild(macros) >= 1.344
675c3d75 21BuildRequires: tar >= 1:1.15.1
affc7bcf 22BuildRequires: php%{?php_suffix}-devel >= 4:5.4
675c3d75 23Requires(triggerpostun): sed >= 4.0
fe31c67f 24ExclusiveArch: %{ix86} %{x8664}
ef055b0a 25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
07f78484 28Zend Guard - PHP code guard.
ef055b0a 29
7461c8a2 30%description -l pl.UTF-8
07f78484 31Zend Guard - optymalizator kodu PHP.
eadf622e 32
08662abe 33%package -n php%{?php_suffix}-%{name}
07f78484
AM
34Summary: Zend Guard for PHP 5.x
35Summary(pl.UTF-8): Zend Guard dla PHP 5.x
675c3d75
ER
36Group: Libraries
37Requires: %{name} = %{version}-%{release}
08662abe
AM
38Requires: php%{?php_suffix}-common >= 4:5.4
39Requires: php%{?php_suffix}-common < 4:5.5
675c3d75 40
08662abe 41%description -n php%{?php_suffix}-%{name}
07f78484 42Zend Guard for PHP 5.x.
eadf622e 43
08662abe 44%description -n php%{?php_suffix}-%{name} -l pl.UTF-8
07f78484 45Zend 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
57cat <<'EOF' > zendguardloader.ini
58; ZendGuardLoader user settings.
b1be7adf 59[Zend]
d02b5b44
AM
60zend_loader.enable=1
61;zend_loader.disable_licensing=0
62;zend_loader.obfuscation_level_support=3
63;zend_loader.license_path=
b1be7adf
ER
64EOF
65
d02b5b44
AM
66cat <<'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 70zend_guard.version=%{version}
08662abe 71zend_extension=%{_libdir}/Zend/lib/GuardLoader-%{version}/php-5.4.x/ZendGuardLoader.so
b1be7adf
ER
72EOF
73
ef055b0a 74%install
75rm -rf $RPM_BUILD_ROOT
08662abe 76install -d $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}/php%{?php_suffix}}
07f78484 77
8eee1461
AM
78for d in php-*; do
79 install -D $d/ZendGuardLoader.so $RPM_BUILD_ROOT%{_libdir}/Zend/lib/GuardLoader-%{version}/$d/ZendGuardLoader.so
80done
81
08662abe 82ln -s %{_sysconfdir}/php%{?php_suffix} $RPM_BUILD_ROOT%{_libdir}/Zend%{_sysconfdir}
ef055b0a 83
08662abe
AM
84install -d $RPM_BUILD_ROOT%{_sysconfdir}/php%{?php_suffix}/conf.d
85install zendguardloader.ini $RPM_BUILD_ROOT%{_sysconfdir}/php%{?php_suffix}/conf.d/zendguardloader.ini
86install zendguardloaderpack.ini $RPM_BUILD_ROOT%{_sysconfdir}/php%{?php_suffix}/conf.d/zendguardloader_pack.ini
675c3d75 87
69133cfa
JB
88%clean
89rm -rf $RPM_BUILD_ROOT
90
08662abe 91%preun -n php%{?php_suffix}-%{name}
5a74951f 92if [ "$1" = "0" ]; then
7506c84b 93 %php_webserver_restart
ef055b0a 94fi
95
08662abe 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 99if [ ! -L %{_libdir}/Zend%{_sysconfdir} ]; then
08662abe 100ln -snf %{_sysconfdir}/php%{?php_suffix} %{_libdir}/Zend%{_sysconfdir}
675c3d75 101fi
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
08662abe 121%files -n php%{?php_suffix}-%{name}
675c3d75 122%defattr(644,root,root,755)
08662abe
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
This page took 0.088918 seconds and 4 git commands to generate.