]> git.pld-linux.org Git - packages/php-ioncube.git/blob - php-ioncube.spec
- install correct config
[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 Source10:       %{_name}.ini
16 URL:            http://ioncube.com/
17 BuildRequires:  coreutils
18 Requires:       php-common >= 4:5.0.4
19 ExclusiveArch:  %{ix86} %{x8664} ppc
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 ionCube loader module for PHP.
24
25 %prep
26 %ifarch %{ix86}
27 %setup -q -T -b 0 -n %{_name}
28 %endif
29 %ifarch %{x8664}
30 %setup -q -T -b 1 -n %{_name}
31 %endif
32 %ifarch ppc
33 %setup -q -T -b 2 -n %{_name}
34 %endif
35
36 %build
37
38 %install
39 rm -rf $RPM_BUILD_ROOT
40 install -d $RPM_BUILD_ROOT{%{php_extensiondir},%{php_sysconfdir}/conf.d}
41
42 install $(ls -1 *_ts.so  | sort | tail -n 1) $RPM_BUILD_ROOT%{php_extensiondir}/%{_name}.so
43 install %{SOURCE10} $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_name}.ini
44
45 %clean
46 rm -rf $RPM_BUILD_ROOT
47
48 %post
49 %php_webserver_restart
50
51 %postun
52 if [ "$1" = 0 ]; then
53         %php_webserver_restart
54 fi
55
56 %preun
57 if [ "$1" = 0 ]; then
58         # remove last pieces of cache
59         rm -rf /var/cache/%{_name}/*
60 fi
61
62 %files
63 %defattr(644,root,root,755)
64 %doc *.txt *.php
65 %config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_name}.ini
66 %attr(755,root,root) %{php_extensiondir}/ioncube.so
This page took 0.056349 seconds and 4 git commands to generate.