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