]> git.pld-linux.org Git - packages/php-ioncube.git/blame_incremental - php-ioncube.spec
- rel 6; make sure it uses correct zend_extension directive for php 5.2 and 5.3
[packages/php-ioncube.git] / php-ioncube.spec
... / ...
CommitLineData
1%ifarch %{ix86}
2%define ver 4.0.0
3%endif
4%ifarch %{x8664}
5%define ver 4.0.0
6%endif
7%ifarch ppc
8%define ver 3.1.33
9%endif
10%define modname ioncube
11Summary: ionCube loader module for PHP
12Summary(pl.UTF-8): Moduł wczytujący ionCube dla PHP
13Name: php-%{modname}
14Version: %{ver}
15# Never decrease release in this package.
16# As not all arch versions are identical, you could be making some arch package older.
17Release: 6
18License: redistributable
19Group: Libraries
20Source0: http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.bz2
21# Source0-md5: 163e947e9da863c1fdf12e0a15b3f20b
22Source1: http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.bz2
23# Source1-md5: 8f628b49916ba47a5441eb797a883a56
24Source2: http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_ppc.tar.bz2
25# Source2-md5: 592ecac4c53028ad22e8cfb0cc8edd36
26URL: http://www.ioncube.com/
27BuildRequires: php-devel >= 4:5.2.0
28BuildRequires: rpmbuild(macros) >= 1.579
29BuildRequires: sed >= 4.0
30%{?requires_php_extension}
31ExclusiveArch: %{ix86} %{x8664} ppc
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35ionCube loader module for PHP.
36
37%description -l pl.UTF-8
38Moduł wczytujący ionCube dla PHP.
39
40%prep
41%ifarch %{ix86}
42%setup -q -T -b 0 -n %{modname}
43%endif
44%ifarch %{x8664}
45%setup -q -T -b 1 -n %{modname}
46%endif
47%ifarch ppc
48%setup -q -T -b 2 -n %{modname}
49%endif
50%undos *.txt
51
52mv ioncube_loader_lin_%{php_major_version}.%{php_minor_version}%{?zend_zts}.so %{modname}.so
53ver=$(strings %{modname}.so | grep -F %{version})
54if [ "$ver" != "%{version}" ]; then
55 exit 1
56fi
57
58%install
59rm -rf $RPM_BUILD_ROOT
60install -d $RPM_BUILD_ROOT{%{php_extensiondir},%{php_sysconfdir}/conf.d}
61
62install -p %{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
63cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
64; Enable %{modname} extension module
65%if %{php_major_version} == 5 && %{php_minor_version} < 3
66zend_extension%{?zend_zts:_ts}=%{php_extensiondir}/%{modname}.so
67%else
68zend_extension=%{php_extensiondir}/%{modname}.so
69%endif
70EOF
71
72%clean
73rm -rf $RPM_BUILD_ROOT
74
75%post
76%php_webserver_restart
77
78%postun
79if [ "$1" = 0 ]; then
80 %php_webserver_restart
81fi
82
83%files
84%defattr(644,root,root,755)
85%doc *.txt *.php
86%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
87%attr(755,root,root) %{php_extensiondir}/ioncube.so
This page took 0.052628 seconds and 4 git commands to generate.