]> git.pld-linux.org Git - packages/php-ioncube.git/blob - php-ioncube.spec
- full path to so file needed
[packages/php-ioncube.git] / php-ioncube.spec
1 #
2 %define         _name           ioncube
3 Summary:        ionCube loader module for PHP
4 Name:           php-%{_name}
5 Version:        3.1
6 Release:        1
7 License:        redistributable
8 Group:          Libraries
9 Source0:        http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.bz2
10 # Source0-md5:  a6460e8cfabdd3c7c04c2d7181b4bf2d
11 Source1:        http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.bz2
12 # Source1-md5:  e6a3fe99bc850fe9c94a4074ec286139
13 Source2:        http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_ppc.tar.bz2
14 # Source2-md5:  233acef94ff789a799f0637648d1e10f
15 URL:            http://ioncube.com/
16 BuildRequires:  coreutils
17 Requires:       php-common >= 4:5.0.4
18 ExclusiveArch:  %{ix86} %{x8664} ppc
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %description
22 ionCube loader module for PHP.
23
24 %prep
25 %ifarch %{ix86}
26 %setup -q -T -b 0 -n %{_name}
27 %endif
28 %ifarch %{x8664}
29 %setup -q -T -b 1 -n %{_name}
30 %endif
31 %ifarch ppc
32 %setup -q -T -b 2 -n %{_name}
33 %endif
34
35 %build
36
37 %install
38 rm -rf $RPM_BUILD_ROOT
39 install -d $RPM_BUILD_ROOT{%{php_extensiondir},%{php_sysconfdir}/conf.d}
40
41 install $(ls -1 *_ts.so  | sort | tail -n 1) $RPM_BUILD_ROOT%{php_extensiondir}/%{_name}.so
42 echo "zend_extension_ts=%{php_extensiondir}/%{_name}.so" > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_name}.ini
43
44 %clean
45 rm -rf $RPM_BUILD_ROOT
46
47 %post
48 %php_webserver_restart
49
50 %postun
51 if [ "$1" = 0 ]; then
52         %php_webserver_restart
53 fi
54
55 %preun
56 if [ "$1" = 0 ]; then
57         # remove last pieces of cache
58         rm -rf /var/cache/%{_name}/*
59 fi
60
61 %files
62 %defattr(644,root,root,755)
63 %doc *.txt *.php
64 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_name}.ini
65 %attr(755,root,root) %{php_extensiondir}/ioncube.so
This page took 0.034304 seconds and 4 git commands to generate.