diff options
author | Remi Collet <remi@remirepo.net> | 2024-10-17 10:53:47 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-10-17 10:53:47 +0200 |
commit | 1cef106446ba62a8fd7ff2c78cca60a08d5ed94d (patch) | |
tree | f63cce0b47d89217543d7f2747af229d3422b849 | |
parent | 8bfb60aedcef65363ccd92b187f18d24c3257f8b (diff) |
-rw-r--r-- | php-pecl-ssh2.spec | 53 |
1 files changed, 10 insertions, 43 deletions
diff --git a/php-pecl-ssh2.spec b/php-pecl-ssh2.spec index 1e7c89e..35ea5df 100644 --- a/php-pecl-ssh2.spec +++ b/php-pecl-ssh2.spec @@ -65,20 +65,6 @@ Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} 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 -Obsoletes: php53-pecl-%{pecl_name} <= %{version} -Obsoletes: php53u-pecl-%{pecl_name} <= %{version} -Obsoletes: php54-pecl-%{pecl_name} <= %{version} -Obsoletes: php56u-pecl-%{pecl_name} <= %{version} -%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 - %if %{move_to_opt} %{?filter_requires_in: %filter_requires_in %{_libdir}/.*\.so$} %endif @@ -109,7 +95,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} @@ -140,6 +126,8 @@ 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 \ @@ -148,7 +136,8 @@ cd ../NTS %endif --with-libdir=%{_lib} \ --with-php-config=%{__phpconfig} -make %{?_smp_mflags} + +%make_build %if %{with_zts} cd ../ZTS @@ -158,14 +147,15 @@ cd ../ZTS %endif --with-libdir=%{_lib} \ --with-php-config=%{__ztsphpconfig} -make %{?_smp_mflags} + +%make_build %endif %install %{?dtsenable} -make -C NTS install INSTALL_ROOT=%{buildroot} +%make_install -C NTS # Install XML package description install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml @@ -174,7 +164,7 @@ install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml install -Dpm644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} %if %{with_zts} -make -C ZTS install INSTALL_ROOT=%{buildroot} +%make_install -C ZTS install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif @@ -201,31 +191,8 @@ done %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 0%{?gh_date} -echo -e "\n** %{name} is an experimental package, built from a development sources snapshot **\n" -%endif -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 |