]> git.pld-linux.org Git - packages/php-ioncube.git/commitdiff
- update: ix86: 3.3.17, x86_64: 3.3.18 auto/th/php-ioncube-3_3_17-2
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 3 Jun 2010 09:56:29 +0000 (09:56 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- simplify build system, make more flexible (zts vs not zts) and check versions

Changed files:
    php-ioncube.spec -> 1.12

php-ioncube.spec

index e17b81a29bc4030179b05b68abe16c1e67ed227c..41ead8e788e4d1d4ff691fe4e8755334a9e4bba4 100644 (file)
@@ -1,26 +1,33 @@
-%define                _name           ioncube
+%ifarch %{ix86}
+%define                ver     3.3.17
+%endif
+%ifarch %{x8664}
+%define                ver     3.3.18
+%endif
+%ifarch ppc
+%define                ver     3.1.33
+%endif
+%define                modname         ioncube
 Summary:       ionCube loader module for PHP
 Summary(pl.UTF-8):     Moduł wczytujący ionCube dla PHP
-Name:          php-%{_name}
-# this is version of x86 modules; ppc one are usually older
-Version:       3.3.10
-Release:       1
+Name:          php-%{modname}
+Version:       %{ver}
+# Never decrease release in this package.
+# As not all arch versions are identical, you could be making some arch package older.
+Release:       2
 License:       redistributable
 Group:         Libraries
-# 3.3.10
 Source0:       http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.bz2
-# Source0-md5: d58f47c18ca35824276dfde808103890
-# 3.3.10
+# Source0-md5: d2c0e85fe9ac94c5574e4c41b767c4f6
 Source1:       http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.bz2
-# Source1-md5: 5a306947fbf9303b625ebdc26a0b4d40
-# 3.1.33
+# Source1-md5: db235ffc984b9a8cfea3e24822a42186
 Source2:       http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_ppc.tar.bz2
-# Source2-md5: 8d3064a52127fa8d47ec5ddfca12047d
-URL:           http://ioncube.com/
-BuildRequires: php-devel >= 3:5.0.0
-BuildRequires: rpmbuild(macros) >= 1.532
+# Source2-md5: 7c0c3e6f02dafa9bf09664b44e2f5340
+URL:           http://www.ioncube.com/
+BuildRequires: php-devel >= 4:5.0.4
+BuildRequires: rpmbuild(macros) >= 1.566
+BuildRequires: sed >= 4.0
 %{?requires_php_extension}
-Requires:      php-common >= 4:5.0.4
 ExclusiveArch: %{ix86} %{x8664} ppc
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -32,21 +39,31 @@ Moduł wczytujący ionCube dla PHP.
 
 %prep
 %ifarch %{ix86}
-%setup -q -T -b 0 -n %{_name}
+%setup -q -T -b 0 -n %{modname}
 %endif
 %ifarch %{x8664}
-%setup -q -T -b 1 -n %{_name}
+%setup -q -T -b 1 -n %{modname}
 %endif
 %ifarch ppc
-%setup -q -T -b 2 -n %{_name}
+%setup -q -T -b 2 -n %{modname}
 %endif
+%undos *.txt
+
+mv ioncube_loader_lin_%{php_major_version}.%{php_minor_version}%{?zend_zts:_ts}.so %{modname}.so
+ver=$(strings %{modname}.so | grep -F %{version})
+if [ "$ver" != "%{version}" ]; then
+       exit 1
+fi
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{php_extensiondir},%{php_sysconfdir}/conf.d}
 
-install $(ls -1 *_%{php_major_version}.%{php_minor_version}_ts.so  | sort | tail -n 1) $RPM_BUILD_ROOT%{php_extensiondir}/%{_name}.so
-echo "zend_extension_ts=%{php_extensiondir}/%{_name}.so" > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_name}.ini
+install -p %{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
+; Enable %{modname} extension module
+zend_extension%{?zend_zts:_ts}=%{php_extensiondir}/%{modname}.so
+EOF
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -62,5 +79,5 @@ fi
 %files
 %defattr(644,root,root,755)
 %doc *.txt *.php
-%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_name}.ini
+%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini
 %attr(755,root,root) %{php_extensiondir}/ioncube.so
This page took 0.127369 seconds and 4 git commands to generate.