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