]> git.pld-linux.org Git - packages/ZendGuardLoader.git/blob - ZendGuardLoader.spec
- up to 6.0.0 (supports PHP5.4 only)
[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:        6.0.0
11 Release:        1
12 License:        Zend License, distributable only if unmodified and for free (see LICENSE)
13 Group:          Libraries
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)
25
26 %description
27 Zend Guard - PHP code guard.
28
29 %description -l pl.UTF-8
30 Zend Guard - optymalizator kodu PHP.
31
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
35 Group:          Libraries
36 Requires:       %{name} = %{version}-%{release}
37 Requires:       php%{?php_suffix}-common >= 4:5.4
38 Requires:       php%{?php_suffix}-common < 4:5.5
39
40 %description -n php%{?php_suffix}-%{name}
41 Zend Guard for PHP 5.x.
42
43 %description -n php%{?php_suffix}-%{name} -l pl.UTF-8
44 Zend Guard dla PHP 5.x.
45
46 %prep
47 %setup -q -c
48
49 %ifarch %{ix86}
50 %{__tar} --strip-components=1 -zxf %{SOURCE0}
51 %endif
52 %ifarch %{x8664}
53 %{__tar} --strip-components=1 -zxf %{SOURCE1}
54 %endif
55
56 cat <<'EOF' > zendguardloader.ini
57 ; ZendGuardLoader user settings.
58 [Zend]
59 zend_loader.enable=1
60 ;zend_loader.disable_licensing=0
61 ;zend_loader.obfuscation_level_support=3
62 ;zend_loader.license_path=
63 EOF
64
65 cat <<'EOF' > zendguardloaderpack.ini
66 ; ZendGuardLoader package settings. Overwritten with each upgrade.
67 ; if you need to add options, edit %{name}.ini instead
68 [Zend]
69 zend_guard.version=%{version}
70 zend_extension=%{_libdir}/Zend/lib/GuardLoader-%{version}/php-5.4.x/ZendGuardLoader.so
71 EOF
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}/php%{?php_suffix}}
76
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
81 ln -s %{_sysconfdir}/php%{?php_suffix} $RPM_BUILD_ROOT%{_libdir}/Zend%{_sysconfdir}
82
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
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %preun -n php%{?php_suffix}-%{name}
91 if [ "$1" = "0" ]; then
92         %php_webserver_restart
93 fi
94
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}
100 fi
101 %php_webserver_restart
102
103 #%%post
104 #if [ "$1" = 1 ]; then
105 #%%banner -e %{name} <<EOF
106 #Remember to read %{_docdir}/%{name}-%{version}/LICENSE.gz!
107 #EOF
108 #fi
109
110 %files
111 %defattr(644,root,root,755)
112 %doc README.txt
113 %dir %{_libdir}/Zend
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}
119
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
This page took 0.034721 seconds and 3 git commands to generate.