diff options
author | Remi Collet <remi@remirepo.net> | 2024-10-10 15:22:25 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-10-10 15:22:25 +0200 |
commit | 2ddb30c61a1a8c71fbd9da0cee4f612f33d41b2e (patch) | |
tree | 9fb202684d4bf7ec52e2788f0ca3f23eabc937e4 /php-pecl-yaml.spec | |
parent | b3cb0ca1e0ef0e5bdb75ac00acf3c666ce91f7a7 (diff) |
cleanup for Fedora reviewfedora
Diffstat (limited to 'php-pecl-yaml.spec')
-rw-r--r-- | php-pecl-yaml.spec | 98 |
1 files changed, 25 insertions, 73 deletions
diff --git a/php-pecl-yaml.spec b/php-pecl-yaml.spec index 3a88b6b..6a042de 100644 --- a/php-pecl-yaml.spec +++ b/php-pecl-yaml.spec @@ -1,7 +1,3 @@ -# remirepo spec file for php-pecl-yaml -# -# Copyright (c) 2012-2024 Remi Collet - # Fedora spec file for php-pecl-yaml # # License: MIT @@ -9,8 +5,6 @@ # # Please, preserve the changelog entries # -%{?scl:%scl_package php-pecl-yaml} - %bcond_without tests %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} @@ -20,32 +14,31 @@ %global upstream_version 2.2.4 #global upstream_prever b2 %global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} -%global _configure ../%{sources}/configure -Summary: PHP Bindings for yaml -Name: %{?scl_prefix}php-pecl-yaml +Summary: PHP Bindings for libyaml +Name: php-pecl-%{pecl_name} Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 1%{?dist} License: MIT -URL: https://pecl.php.net/package/yaml +URL: https://pecl.php.net/package/%{pecl_name} -Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz +Source0: https://pecl.php.net/get/%{sources}.tgz ExcludeArch: %{ix86} BuildRequires: make -BuildRequires: %{?dtsprefix}gcc -BuildRequires: %{?scl_prefix}php-devel >= 7.1 -BuildRequires: %{?scl_prefix}php-pear +BuildRequires: gcc +BuildRequires: php-devel +BuildRequires: php-pear BuildRequires: libyaml-devel -Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} -Requires: %{?scl_prefix}php(api) = %{php_core_api} +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(%{pecl_name}) = %{version} -Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} +Provides: php-%{pecl_name} = %{version} +Provides: php-%{pecl_name}%{?_isa} = %{version} +Provides: php-pecl(%{pecl_name}) = %{version} +Provides: php-pecl(%{pecl_name})%{?_isa} = %{version} %description @@ -101,52 +94,31 @@ extension=%{pecl_name}.so ;yaml.decode_php = 0 EOF -mkdir NTS ZTS - %build -%{?dtsenable} - cd %{sources} %{__phpize} -[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global -sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL +sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global -cd ../NTS %configure \ --with-libdir=%{_lib} \ --with-php-config=%{__phpconfig} %make_build -%if %{with_zts} -cd ../ZTS -%configure \ - --with-libdir=%{_lib} \ - --with-php-config=%{__ztsphpconfig} - -%make_build -%endif - %install -%{?dtsenable} - -%make_install -C NTS - -# Install XML package description +: Install the XML package description install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml -# install config file +: install the config file install -Dpm644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} -%if %{with_zts} -%make_install -C ZTS -install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} -%endif - -# Documentation +: Install the extension cd %{sources} +%make_install + +: Install the Documentation for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -157,28 +129,13 @@ cd %{sources} : Minimal load test for NTS extension %{__php} --no-php-ini \ - --define extension=$PWD/../NTS/modules/%{pecl_name}.so \ + --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep '^%{pecl_name}$' %if %{with tests} : Upstream test suite for NTS extension -TEST_PHP_ARGS="-n -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ -REPORT_EXIT_STATUS=1 \ -%{__php} -n run-tests.php -q -P --show-diff -%endif - -%if %{with_zts} -: Minimal load test for ZTS extension -%{__ztsphp} --no-php-ini \ - --define extension=$PWD/../ZTS/modules/%{pecl_name}.so \ - --modules | grep '^%{pecl_name}$' - -%if %{with tests} -: Upstream test suite for ZTS extension -TEST_PHP_ARGS="-n -d extension=$PWD/../ZTS/modules/%{pecl_name}.so" \ -REPORT_EXIT_STATUS=1 \ -%{__ztsphp} -n run-tests.php -q -P --show-diff -%endif +TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ +%{__php} -n run-tests.php -q -P --show-diff %{?_smp_mflags} %endif @@ -186,20 +143,15 @@ REPORT_EXIT_STATUS=1 \ %license %{sources}/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml - %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so -%if %{with_zts} -%config(noreplace) %{php_ztsinidir}/%{ini_name} -%{php_ztsextdir}/%{pecl_name}.so -%endif - %changelog * Mon Oct 7 2024 Remi Collet <remi@remirepo.net> - 2.2.4-1 - update to 2.2.4 - drop patches merged upstream +- cleanup for Fedora review * Mon Sep 30 2024 Remi Collet <remi@remirepo.net> - 2.2.3-5 - fix test suite with 8.4 using patch from |