diff options
-rw-r--r-- | php-smbclient.spec | 55 |
1 files changed, 8 insertions, 47 deletions
diff --git a/php-smbclient.spec b/php-smbclient.spec index 5289cef..d423950 100644 --- a/php-smbclient.spec +++ b/php-smbclient.spec @@ -24,11 +24,7 @@ %global pecl_name smbclient %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} -%if "%{php_version}" < "5.6" %global ini_name %{pecl_name}.ini -%else -%global ini_name 40-%{pecl_name}.ini -%endif # Test suite requires a Samba server and configuration file %bcond_with tests %global sources %{pecl_name}-%{version}%{?prever} @@ -61,7 +57,6 @@ BuildRequires: samba Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} # Rename Obsoletes: %{?scl_prefix}php-libsmbclient < 0.8.0-0.2 Provides: %{?scl_prefix}php-libsmbclient = %{version}-%{release} @@ -72,22 +67,6 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{rele Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7 -# Other third party repo stuff -%if "%{php_version}" > "7.0" -Obsoletes: php70u-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.1" -Obsoletes: php71u-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.2" -Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -%endif -%endif - %description %{pecl_name} is a PHP extension that uses Samba's libsmbclient @@ -102,7 +81,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO # Don't install/register tests sed -e 's/role="test"/role="src"/' \ - %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -e '/LICENSE/s/role="doc"/role="src"/' \ -i package.xml cd %{sources} @@ -133,22 +112,24 @@ mkdir ZTS cd %{sources} %{__phpize} +[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global +sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL cd ../NTS %configure --with-php-config=%{__phpconfig} -make %{?_smp_mflags} +%make_build %if %{with_zts} cd ../ZTS %configure --with-php-config=%{__ztsphpconfig} -make %{?_smp_mflags} +%make_build %endif %install %{?dtsenable} -make -C NTS install INSTALL_ROOT=%{buildroot} +%make_install -C NTS # install configuration install -Dpm 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} @@ -157,7 +138,7 @@ install -Dpm 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %if %{with_zts} -make -C ZTS install INSTALL_ROOT=%{buildroot} +%make_install -C ZTS install -Dpm 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif @@ -191,28 +172,8 @@ cp %{SOURCE2} phpunit.xml %endif -%if 0%{?fedora} < 24 && 0%{?rhel} < 8 -# when pear installed alone, after us -%triggerin -- %{?scl_prefix}php-pear -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -# posttrans as pear can be installed after us -%posttrans -if [ -x %{__pecl} ] ; then - %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : -fi - -%postun -if [ $1 -eq 0 -a -x %{__pecl} ] ; then - %{pecl_uninstall} %{pecl_name} >/dev/null || : -fi -%endif - - %files -%{?_licensedir:%license %{sources}/LICENSE} +%license %{sources}/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml |