diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-09-01 10:47:18 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-09-01 10:47:18 +0200 |
commit | 331d22dbc0b4ceafbdc1738205e152537af7c546 (patch) | |
tree | e7eb1fed1ab55dd57d5ea26fece644e00f9df39d | |
parent | eea5655c6f865af667f4e413ed2da94a70d07237 (diff) |
php-ioncube-loader: SCL build
-rw-r--r-- | php-ioncube-loader.spec | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/php-ioncube-loader.spec b/php-ioncube-loader.spec index b3edaad..2be63d6 100644 --- a/php-ioncube-loader.spec +++ b/php-ioncube-loader.spec @@ -6,13 +6,15 @@ # # Please, preserve the changelog entries # -%global extname ioncube_loader +%{?scl: %scl_package php-ioncube-loader} +%global extname ioncube_loader %global debug_package %{nil} +%global with_zts 0%{?__ztsphp:1} -Name: php-ioncube-loader +Name: %{?scl_prefix}php-ioncube-loader Summary: Loader for ionCube Encoded Files Version: 4.6.1 -Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: Distribuable Group: Development/Languages @@ -21,23 +23,29 @@ Source0: http://downloads2.ioncube.com/loader_downloads/%{extname}s_lin_x8 Source1: http://downloads2.ioncube.com/loader_downloads/%{extname}s_lin_x86-64.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildRequires: php-devel +BuildRequires: %{?scl_prefix}php-devel # ABI check -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} +Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} +Requires: %{?scl_prefix}php(api) = %{php_core_api} +%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} # Other third party repo stuff -Obsoletes: php53-ioncube-loader -Obsoletes: php53u-ioncube-loader -Obsoletes: php54-ioncube-loader +Obsoletes: php53-ioncube-loader <= %{version} +Obsoletes: php53u-ioncube-loader <= %{version} +Obsoletes: php54-ioncube-loader <= %{version} +Obsoletes: php54w-ioncube-loader <= %{version} %if "%{php_version}" > "5.5" -Obsoletes: php55u-ioncube-loader +Obsoletes: php55u-ioncube-loader <= %{version} +Obsoletes: php55w-ioncube-loader <= %{version} +%endif %endif +%if 0%{?fedora} < 20 && 0%{?rhel} < 7 # Filter private shared object %{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} %{?filter_setup} +%endif %description @@ -59,10 +67,12 @@ cat > %{extname}.nts << 'EOF' zend_extension = %{php_extdir}/%{extname}.so EOF +%if %{with_zts} cat > %{extname}.zts << 'EOF' ; Enable %{extname} extension module zend_extension = %{php_ztsextdir}/%{extname}.so EOF +%endif %build @@ -81,8 +91,10 @@ fi install -D -pm 755 ioncube/%{extname}_lin_${ver}.so %{buildroot}%{php_extdir}/%{extname}.so install -D -m 644 %{extname}.nts %{buildroot}%{php_inidir}/%{extname}.ini +%if %{with_zts} install -D -pm 755 ioncube/%{extname}_lin_${ver}_ts.so %{buildroot}%{php_ztsextdir}/%{extname}.so install -D -m 644 %{extname}.zts %{buildroot}%{php_ztsinidir}/%{extname}.ini +%endif %check @@ -91,9 +103,11 @@ install -D -m 644 %{extname}.zts %{buildroot}%{php_ztsinid --define zend_extension=%{buildroot}%{php_extdir}/%{extname}.so \ --modules | grep ionCube +%if %{with_zts} %{__ztsphp} --no-php-ini \ --define zend_extension=%{buildroot}%{php_ztsextdir}/%{extname}.so \ --modules | grep ionCube +%endif %clean @@ -107,11 +121,17 @@ rm -rf %{buildroot} %config(noreplace) %{php_inidir}/%{extname}.ini %{php_extdir}/%{extname}.so +%if %{with_zts} %config(noreplace) %{php_ztsinidir}/%{extname}.ini %{php_ztsextdir}/%{extname}.so +%endif %changelog +* Mon Sep 1 2014 Remi Collet <RPMS@famillecollet.com> - 4.6.1-2 +- allow SCL build +- make ZTS optional + * Tue Apr 22 2014 Remi Collet <RPMS@famillecollet.com> - 4.6.1-1 - update to 4.6.1 (Apr 22, 2014) |