Logoj0ke.net Open Build Service > Projects > internetx:php5:5.3.22:extensions > php5-zendguardloader > php5-zendguardloader.spec
Sign Up | Log In

File php5-zendguardloader.spec of Package php5-zendguardloader

 
1
# norootforbuild
2
%define ZendLibname ZendGuardLoader
3
%define pkg_version %(php-config --version | awk -F. '{print $1"."$2 }' 2>/dev/null || echo PHPCONFIG_NOT_FOUND)
4
%define php_version %(php-config --version 2>/dev/null)
5
6
%if "%{pkg_version}" == "5.6"
7
%define pkg_name zend-loader-php%{pkg_version}-linux
8
%ifarch x86_64
9
%define archsuffix -x86_64
10
%else
11
%define archsuffix -i386
12
%endif
13
%else
14
 %if "%{pkg_version}" == "5.5"
15
 %define pkg_name zend-loader-php%{pkg_version}-linux
16
 %ifarch x86_64
17
 %define archsuffix -x86_64
18
 %else
19
 %define archsuffix -i386
20
 %endif
21
 %else
22
  %if "%{pkg_version}" == "5.4"
23
  %define prever 70429-PHP
24
  %define pkg_name ZendGuardLoader-%{prever}-%{pkg_version}-linux-glibc23
25
  %ifarch x86_64
26
  %define archsuffix -x86_64
27
  %else
28
  %define archsuffix -i386
29
  %endif
30
  %else
31
  %define prever php
32
  %define pkg_name ZendGuardLoader-%{prever}-%{pkg_version}-linux-glibc23
33
  %ifarch x86_64
34
  %define archsuffix -x86_64
35
  %else
36
  %define archsuffix -i386
37
  %endif 
38
  %endif
39
 %endif
40
%endif
41
#
42
Name:       php5-zendguardloader
43
Version:    %{pkg_version}
44
Release:    1
45
#
46
License:    PHP
47
Group:      Productivity/Networking/Web/Servers
48
#
49
BuildRoot:  %{_tmppath}/%{pkg_name}-%{version}-build
50
BuildRequires:  php5-devel gcc gcc-c++ chrpath
51
Requires:   php5 = %{php_version}
52
#
53
URL:        http://www.zend.com/
54
Source0:    %{pkg_name}%{archsuffix}.tar.gz
55
Summary:    This package contains the Zend Guard Loader from Zend Technologies Ltd
56
57
%description
58
This package contains the Zend Guard Loader from Zend Technologies Ltd.
59
60
%prep
61
%setup -n %{pkg_name}%{archsuffix}
62
63
%build
64
65
%install
66
%if "%{pkg_version}" == "5.3" || "%{pkg_version}" == "5.4"
67
%__install -D php-%{pkg_version}.x/%{ZendLibname}.so %{buildroot}%{_libdir}/php5/extensions/%{ZendLibname}.so
68
%else
69
chrpath -d %{ZendLibname}.so || : 
70
chrpath -d opcache.so || :
71
%__install -D %{ZendLibname}.so %{buildroot}%{_libdir}/php5/extensions/%{ZendLibname}.so
72
%__install opcache.so %{buildroot}%{_libdir}/php5/extensions/opcache.so
73
chrpath -d %{buildroot}%{_libdir}/php5/extensions/%{ZendLibname}.so || :
74
chrpath -d %{buildroot}%{_libdir}/php5/extensions/opcache.so || :
75
%endif
76
%{__mkdir} -p %{buildroot}%{_sysconfdir}/php5/conf.d
77
echo "; comment out next line to disable %{ZendLibname} extension in php" > %{buildroot}%{_sysconfdir}/php5/conf.d/zendguardloader.ini
78
echo "; extension = %{ZendLibname}.so" >> %{buildroot}%{_sysconfdir}/php5/conf.d/zendguardloader.ini
79
echo ";zend_extension = %{_libdir}/php5/extensions/%{ZendLibname}.so" >> %{buildroot}%{_sysconfdir}/php5/conf.d/zendguardloader.ini
80
echo ";zend_loader.enable = 1" >> %{buildroot}%{_sysconfdir}/php5/conf.d/zendguardloader.ini
81
echo "; Disable license checks (for performance reasons)" >> %{buildroot}%{_sysconfdir}/php5/conf.d/zendguardloader.ini
82
echo ";zend_loader.disable_licensing=0" >> %{buildroot}%{_sysconfdir}/php5/conf.d/zendguardloader.ini
83
echo "; The Obfuscation level supported by Zend Guard Loader. The levels are detailed in the official Zend Guard Documentation. 0 - no obfuscation is enabled" >> %{buildroot}%{_sysconfdir}/php5/conf.d/zendguardloader.ini
84
echo ";zend_loader.obfuscation_level_support=3" >> %{buildroot}%{_sysconfdir}/php5/conf.d/zendguardloader.ini
85
echo "; Path to where licensed Zend products should look for the product license. For more information on how to create a license file, see the Zend Guard User Guide" >> %{buildroot}%{_sysconfdir}/php5/conf.d/zendguardloader.ini
86
echo ";zend_loader.license_path=" >> %{buildroot}%{_sysconfdir}/php5/conf.d/zendguardloader.ini
87
88
%clean
89
%{__rm} -rf %{buildroot}
90
91
%files
92
%defattr(-,root,root,-)
93
%doc README.txt
94
%config(noreplace) %{_sysconfdir}/php5/conf.d/zendguardloader.ini
95
%defattr(0755,root,root)
96
%{_libdir}/php5/extensions/%{ZendLibname}.so
97
%if "%{pkg_version}" >= "5.5"
98
%{_libdir}/php5/extensions/opcache.so
99
%endif
100
101
%changelog
102