diff options
author | Remi Collet <remi@remirepo.net> | 2020-10-15 14:03:59 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-10-15 14:03:59 +0200 |
commit | df95a7377d68a767f8eee2a23d0f1ef6008bd1c9 (patch) | |
tree | c50eefa1ef32a7afdb6b7ebd0ae77fa10207f3a3 /php-pecl-xdebug3.spec | |
parent | 661d409def5803c0d710fd2508136b6bbc111433 (diff) |
cleanup for Fedora review
Diffstat (limited to 'php-pecl-xdebug3.spec')
-rw-r--r-- | php-pecl-xdebug3.spec | 153 |
1 files changed, 29 insertions, 124 deletions
diff --git a/php-pecl-xdebug3.spec b/php-pecl-xdebug3.spec index e223c98..5129206 100644 --- a/php-pecl-xdebug3.spec +++ b/php-pecl-xdebug3.spec @@ -1,6 +1,3 @@ -# remirepo spec file for php-pecl-xdebug -# with SCL compatibility, from: -# # Fedora spec file for php-pecl-xdebug # # Copyright (c) 2010-2020 Remi Collet @@ -12,17 +9,17 @@ # Please, preserve the changelog entries # +%bcond_without tests + # we don't want -z defs linker flag %undefine _strict_symbol_defs_build -%{?scl: %scl_package php-pecl-xdebug} +%global pecl_name xdebug +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global gh_commit e3158f5b7bd84b4e9a18eb170d512416557de803 +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -%global pecl_name xdebug -%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} -%global gh_commit e3158f5b7bd84b4e9a18eb170d512416557de803 -%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) -#global gh_date 20201011 -%global with_tests 0%{!?_without_tests:1} +# version/release %global upstream_version 3.0.0 %global upstream_prever beta1 %global upstream_lower beta1 @@ -30,89 +27,41 @@ # XDebug should be loaded after opcache %global ini_name 15-%{pecl_name}.ini -Name: %{?scl_prefix}php-pecl-xdebug3 +Name: php-pecl-xdebug3 Summary: PECL package for debugging PHP scripts -Version: %{upstream_version}%{?upstream_lower:~%{upstream_lower}} -%if 0%{?gh_date:1} -Release: 1.%{gh_date}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -%else -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -%endif +Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}} +Release: 1%{?dist} +Source0: https://github.com/%{pecl_name}/%{pecl_name}/archive/%{gh_commit}/%{pecl_name}-%{upstream_version}%{?upstream_prever}-%{gh_short}.tar.gz # The Xdebug License, version 1.01 # (Based on "The PHP License", version 3.0) License: BSD URL: https://xdebug.org/ -Source0: https://github.com/%{pecl_name}/%{pecl_name}/archive/%{gh_commit}/%{pecl_name}-%{upstream_version}%{?upstream_prever}-%{gh_short}.tar.gz -BuildRequires: %{?dtsprefix}gcc -BuildRequires: %{?scl_prefix}php-devel > 7.2 -BuildRequires: %{?scl_prefix}php-pear -BuildRequires: %{?scl_prefix}php-simplexml -BuildRequires: libedit-devel +BuildRequires: gcc +BuildRequires: php-devel > 7.2 +BuildRequires: php-pear +BuildRequires: php-simplexml BuildRequires: libtool -%if %{with_tests} -BuildRequires: %{?scl_prefix}php-soap -%endif -%if 0%{?rhel} == 6 -BuildRequires: autoconf268 -%endif +BuildRequires: php-soap -Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} -Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} +Requires: php(zend-abi) = %{php_zend_api} +Requires: php(api) = %{php_core_api} -Provides: %{?scl_prefix}php-%{pecl_name} = %{version} -Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} -Provides: %{?scl_prefix}php-pecl(Xdebug) = %{version} -Provides: %{?scl_prefix}php-pecl(Xdebug)%{?_isa} = %{version} +Provides: php-%{pecl_name} = %{version} +Provides: php-%{pecl_name}%{?_isa} = %{version} +Provides: php-pecl(Xdebug) = %{version} +Provides: php-pecl(Xdebug)%{?_isa} = %{version} %if 0%{?fedora} >= 35 || 0%{?rhel} >= 9 || "%{php_version}" > "8.0" -Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name} < 5 -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} +Obsoletes: php-pecl-%{pecl_name} < 3 +Provides: php-pecl-%{pecl_name} = %{version}-%{release} +Provides: php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} %else # A single version can be installed -Conflicts: %{?scl_prefix}php-pecl-%{pecl_name} < 3 +Conflicts: php-pecl-%{pecl_name} < 3 %endif -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -Obsoletes: php53-pecl-%{pecl_name} <= %{version} -Obsoletes: php53u-pecl-%{pecl_name} <= %{version} -Obsoletes: php54-pecl-%{pecl_name} <= %{version} -Obsoletes: php54w-pecl-%{pecl_name} <= %{version} -Obsoletes: php55u-pecl-%{pecl_name} <= %{version} -Obsoletes: php55w-pecl-%{pecl_name} <= %{version} -Obsoletes: php56u-pecl-%{pecl_name} <= %{version} -Obsoletes: php56w-pecl-%{pecl_name} <= %{version} -Obsoletes: php70u-pecl-%{pecl_name} <= %{version} -Obsoletes: php70w-pecl-%{pecl_name} <= %{version} -Obsoletes: php71u-pecl-%{pecl_name} <= %{version} -Obsoletes: php71w-pecl-%{pecl_name} <= %{version} -%if "%{php_version}" > "7.2" -Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -Obsoletes: php72w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -Obsoletes: php73w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.0" -Obsoletes: php80-pecl-%{pecl_name} <= %{version} -%endif -%endif - -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter private shared -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} -%endif - - %description The Xdebug extension helps you debugging your script by providing a lot of valuable debug information. The debug information that Xdebug can provide @@ -139,20 +88,9 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -qc mv %{pecl_name}-%{gh_commit} NTS - -%if 0%{?gh_date:1} -%{__php} -r ' - $pkg = simplexml_load_file("NTS/package.xml"); - $pkg->date = substr("%{gh_date}",0,4)."-".substr("%{gh_date}",4,2)."-".substr("%{gh_date}",6,2); - $pkg->version->release = "%{upstream_version}dev"; - $pkg->stability->release = "devel"; - $pkg->asXML("package.xml"); -' -%else mv NTS/package.xml . -%endif -%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} +sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml cd NTS # Check extension version @@ -161,7 +99,6 @@ if test "$ver" != "%{upstream_version}%{?upstream_prever}%{?gh_date:-dev}"; then : Error: Upstream XDEBUG_VERSION version is ${ver}, expecting %{upstream_version}%{?upstream_perver}%{?gh_date:-dev}. exit 1 fi - cd .. %if %{with_zts} @@ -181,11 +118,6 @@ sed -e '1d' NTS/%{pecl_name}.ini >>%{ini_name} %build -%if 0%{?rhel} == 6 -export PHP_AUTOCONF=autoconf268;export PHP_AUTOHEADER=autoheader268 -%endif -%{?dtsenable} - cd NTS %{_bindir}/phpize %configure \ @@ -204,8 +136,6 @@ make %{?_smp_mflags} %install -%{?dtsenable} - # install NTS extension make -C NTS install INSTALL_ROOT=%{buildroot} @@ -252,12 +182,10 @@ done --modules | grep Xdebug %endif -%if %{with_tests} +%if %{with tests} cd NTS : Upstream test suite NTS extension -sed -e '/var_display_max_data/s/2048/3075/' -i tests/develop/error_collection-003.phpt - # bug00886 is marked as slow as it uses a lot of disk space TEST_OPTS="-q -x --show-diff" @@ -270,28 +198,8 @@ REPORT_EXIT_STATUS=1 \ %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 NTS/LICENSE} +%license NTS/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -307,9 +215,6 @@ fi %changelog * Thu Oct 15 2020 Remi Collet <remi@remirepo.net> - 3.0.0~beta1-1 - update to 3.0.0beta1 - -* Tue Oct 13 2020 Remi Collet <remi@remirepo.net> - 3.0.0~DEV-1.20201011 -- update to 3.0.0-dev - rename to php-pecl-xdebug3 for new API - debugclient dropped upstream - raise dependency on PHP 7.2 |