]>
Commit | Line | Data |
---|---|---|
e1ed3c35 | 1 | %ifarch %{ix86} |
f69bcef4 | 2 | %define ver 4.6.1 |
e1ed3c35 ER |
3 | %endif |
4 | %ifarch %{x8664} | |
f69bcef4 | 5 | %define ver 4.6.1 |
e1ed3c35 ER |
6 | %endif |
7 | %ifarch ppc | |
8 | %define ver 3.1.33 | |
9 | %endif | |
10 | %define modname ioncube | |
c16a895c | 11 | Summary: ionCube loader module for PHP |
0f02a213 | 12 | Summary(pl.UTF-8): Moduł wczytujący ionCube dla PHP |
afca1a28 | 13 | Name: php%{?php_suffix}-%{modname} |
e1ed3c35 ER |
14 | Version: %{ver} |
15 | # Never decrease release in this package. | |
16 | # As not all arch versions are identical, you could be making some arch package older. | |
65acdbd8 | 17 | Release: 12 |
c16a895c AM |
18 | License: redistributable |
19 | Group: Libraries | |
f69bcef4 AM |
20 | # www.ioncube.com/loaders.php |
21 | Source0: http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.bz2 | |
22 | # Source0-md5: 3e97ba2c5383a095562097ecff8b338b | |
23 | Source1: http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.bz2 | |
24 | # Source1-md5: d400e87e0d6efa20bb4c177e16630e34 | |
25 | Source2: http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_ppc.tar.bz2 | |
f3494015 | 26 | # Source2-md5: c9f44f2245e41cba0617c452488c3dc4 |
e1ed3c35 | 27 | URL: http://www.ioncube.com/ |
afca1a28 | 28 | BuildRequires: php%{?php_suffix}-devel >= 4:5.2.0 |
5d2a8134 | 29 | BuildRequires: rpmbuild(macros) >= 1.579 |
e1ed3c35 | 30 | BuildRequires: sed >= 4.0 |
7b825e67 | 31 | %{?requires_php_extension} |
c16a895c AM |
32 | ExclusiveArch: %{ix86} %{x8664} ppc |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %description | |
36 | ionCube loader module for PHP. | |
37 | ||
0f02a213 JB |
38 | %description -l pl.UTF-8 |
39 | Moduł wczytujący ionCube dla PHP. | |
40 | ||
c16a895c AM |
41 | %prep |
42 | %ifarch %{ix86} | |
e1ed3c35 | 43 | %setup -q -T -b 0 -n %{modname} |
c16a895c AM |
44 | %endif |
45 | %ifarch %{x8664} | |
e1ed3c35 | 46 | %setup -q -T -b 1 -n %{modname} |
c16a895c AM |
47 | %endif |
48 | %ifarch ppc | |
e1ed3c35 | 49 | %setup -q -T -b 2 -n %{modname} |
c16a895c | 50 | %endif |
e1ed3c35 | 51 | |
abaaa412 | 52 | mv ioncube_loader_lin_%{php_major_version}.%{php_minor_version}%{?zend_zts}.so %{modname}.so |
e1ed3c35 ER |
53 | ver=$(strings %{modname}.so | grep -F %{version}) |
54 | if [ "$ver" != "%{version}" ]; then | |
55 | exit 1 | |
56 | fi | |
c16a895c | 57 | |
c16a895c AM |
58 | %install |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | install -d $RPM_BUILD_ROOT{%{php_extensiondir},%{php_sysconfdir}/conf.d} | |
61 | ||
e1ed3c35 ER |
62 | install -p %{modname}.so $RPM_BUILD_ROOT%{php_extensiondir} |
63 | cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini | |
64 | ; Enable %{modname} extension module | |
86c04ca1 | 65 | %if %{php_major_version} == 5 && %{php_minor_version} < 3 |
34f32581 | 66 | zend_extension%{?zend_zts}=%{php_extensiondir}/%{modname}.so |
86c04ca1 AM |
67 | %else |
68 | zend_extension=%{php_extensiondir}/%{modname}.so | |
69 | %endif | |
e1ed3c35 | 70 | EOF |
c16a895c AM |
71 | |
72 | %clean | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | ||
75 | %post | |
76 | %php_webserver_restart | |
77 | ||
78 | %postun | |
79 | if [ "$1" = 0 ]; then | |
80 | %php_webserver_restart | |
81 | fi | |
82 | ||
c16a895c AM |
83 | %files |
84 | %defattr(644,root,root,755) | |
e1ed3c35 | 85 | %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini |
c16a895c | 86 | %attr(755,root,root) %{php_extensiondir}/ioncube.so |