]> git.pld-linux.org Git - packages/ZendGuardLoader.git/blob - ZendGuardLoader.spec
75c06209cb1fad98b92b31188c5b50c4cb1c7f74
[packages/ZendGuardLoader.git] / ZendGuardLoader.spec
1 # DO NOT MODIFY CONTENTS OF PACKAGE - AGAINST LICENSE AND MAKES IT UNDISTRIBUTABLE
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
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
11 Release:        1
12 License:        Zend License, distributable only if unmodified and for free (see LICENSE)
13 Group:          Libraries
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
19 BuildRequires:  rpmbuild(macros) >= 1.344
20 BuildRequires:  tar >= 1:1.15.1
21 Requires(triggerpostun):        sed >= 4.0
22 ExclusiveArch:  %{ix86} %{x8664}
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 Zend Guard - PHP code guard.
27
28 %description -l pl.UTF-8
29 Zend Guard - optymalizator kodu PHP.
30
31 %package -n php-%{name}
32 Summary:        Zend Guard for PHP 5.x
33 Summary(pl.UTF-8):      Zend Guard dla PHP 5.x
34 Group:          Libraries
35 Requires:       %{name} = %{version}-%{release}
36 Requires:       php-common >= 4:5.3
37
38 %description -n php-%{name}
39 Zend Guard for PHP 5.x.
40
41 %description -n php-%{name} -l pl.UTF-8
42 Zend Guard dla PHP 5.x.
43
44 %prep
45 %setup -q -c
46
47 %ifarch %{ix86}
48 %{__tar} --strip-components=1 -zxf %{SOURCE0}
49 %endif
50 %ifarch %{x8664}
51 %{__tar} --strip-components=1 -zxf %{SOURCE1}
52 %endif
53
54 cat <<'EOF' > zendguardloader.ini
55 ; ZendGuardLoader user settings.
56 [Zend]
57 zend_loader.enable=1
58 ;zend_loader.disable_licensing=0
59 ;zend_loader.obfuscation_level_support=3
60 ;zend_loader.license_path=
61 EOF
62
63 cat <<'EOF' > zendguardloaderpack.ini
64 ; ZendGuardLoader package settings. Overwritten with each upgrade.
65 ; if you need to add options, edit %{name}.ini instead
66 [Zend]
67 zend_guard.version=%{version}
68 zend_extension=%{_libdir}/Zend/lib/GuardLoader-%{version}/php-5.3.x/ZendGuardLoader.so
69 EOF
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}/php}
74
75 for d in php-*; do
76         install -D $d/ZendGuardLoader.so $RPM_BUILD_ROOT%{_libdir}/Zend/lib/GuardLoader-%{version}/$d/ZendGuardLoader.so
77 done
78
79 ln -s %{_sysconfdir}/php $RPM_BUILD_ROOT%{_libdir}/Zend%{_sysconfdir}
80
81 install -d $RPM_BUILD_ROOT%{_sysconfdir}/php/conf.d
82 install zendguardloader.ini $RPM_BUILD_ROOT%{_sysconfdir}/php/conf.d/zendguardloader.ini
83 install zendguardloaderpack.ini $RPM_BUILD_ROOT%{_sysconfdir}/php/conf.d/zendguardloader_pack.ini
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %preun -n php-%{name}
89 if [ "$1" = "0" ]; then
90         %php_webserver_restart
91 fi
92
93 %post -n php-%{name}
94 # let %{_prefix}/lib/Zend%{_sysconfdir} point to php's config dir. php which installed first wins.
95 # not sure how critical is existence of this etc link at all.
96 if [ ! -L %{_libdir}/Zend%{_sysconfdir} ]; then
97 ln -snf %{_sysconfdir}/php %{_libdir}/Zend%{_sysconfdir}
98 fi
99 %php_webserver_restart
100
101 #%%post
102 #if [ "$1" = 1 ]; then
103 #%%banner -e %{name} <<EOF
104 #Remember to read %{_docdir}/%{name}-%{version}/LICENSE.gz!
105 #EOF
106 #fi
107
108 %files
109 %defattr(644,root,root,755)
110 %doc README.txt
111 %dir %{_libdir}/Zend
112 %dir %{_libdir}/Zend/lib
113 %dir %{_libdir}/Zend/lib/GuardLoader-%{version}
114 %dir %{_libdir}/Zend/lib/GuardLoader-%{version}/php-*
115 %attr(755,root,root) %{_libdir}/Zend/lib/GuardLoader-%{version}/php-*/ZendGuardLoader.so
116 %ghost %{_libdir}/Zend%{_sysconfdir}
117
118 %files -n php-%{name}
119 %defattr(644,root,root,755)
120 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php/conf.d/zendguardloader.ini
121 %config %verify(not md5 mtime size) %{_sysconfdir}/php/conf.d/zendguardloader_pack.ini
This page took 0.082345 seconds and 2 git commands to generate.