From 2eede14257dc683fd835423c9e3a0349e19416cd Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 9 Sep 2024 07:42:54 +0200 Subject: dup spec --- php-yoast-phpunit-polyfills2.spec | 160 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 160 insertions(+) create mode 100644 php-yoast-phpunit-polyfills2.spec (limited to 'php-yoast-phpunit-polyfills2.spec') diff --git a/php-yoast-phpunit-polyfills2.spec b/php-yoast-phpunit-polyfills2.spec new file mode 100644 index 0000000..5b65bf8 --- /dev/null +++ b/php-yoast-phpunit-polyfills2.spec @@ -0,0 +1,160 @@ +# remirepo/fedora spec file for php-yoast-phpunit-polyfills +# +# Copyright (c) 2020-2024 Remi Collet +# License: CC-BY-SA-4.0 +# http://creativecommons.org/licenses/by-sa/4.0/ +# +# Please preserve changelog entries +# +# Github +%global gh_commit 4a088f125c970d6d6ea52c927f96fe39b330d0f1 +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner Yoast +%global gh_project PHPUnit-Polyfills +# Packagist +%global pk_vendor yoast +%global pk_project phpunit-polyfills +# Namespace +%global ns_vendor Yoast +%global ns_project PHPUnitPolyfills +# don't change major version used in package name +%global major 2 +%bcond_without tests +%global php_home %{_datadir}/php + +Name: php-%{pk_vendor}-%{pk_project} +Version: 2.0.1 +Release: 1%{?dist} +Summary: Set of polyfills for changed PHPUnit functionality + +License: BSD-3-Clause +URL: https://github.com/%{gh_owner}/%{gh_project} +# git snapshot to get upstream test suite +Source0: %{name}-%{version}-%{gh_short}.tgz +Source1: makesrc.sh + +BuildArch: noarch +%if %{with tests} +BuildRequires: php(language) >= 5.6 +BuildRequires: php-reflection +# From composer.json, "require-dev": { +# "yoast/yoastcs": "^2.3.0" +BuildRequires: phpunit10 +BuildRequires: phpunit9 +BuildRequires: phpunit8 +%endif +BuildRequires: php-fedora-autoloader-devel + +# From composer.json, "require": { +# "php": ">=5.6", +# "phpunit/phpunit": "^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0" +Requires: php(language) >= 5.6 +# from phpcompatinfo report on version 0.2.0 +Requires: php-reflection + +Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version} + + +%description +Set of polyfills for changed PHPUnit functionality to allow for creating +PHPUnit cross-version compatible tests. + +Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php + + + +%prep +%setup -q -n %{gh_project}-%{gh_commit} + +# Fix for RPM layout +sed -e 's:src/::' phpunitpolyfills-autoload.php > src/autoload.php + + +%build +# Empty build section, most likely nothing required. + + +%install +mkdir -p %{buildroot}/%{php_home}/%{ns_vendor} +cp -pr src %{buildroot}/%{php_home}/%{ns_vendor}/%{ns_project}%{major} + + +%check +%if %{with tests} +: Use installed tree and autoloader +mkdir vendor +cat << 'EOF' | tee -a vendor/autoload.php + - 2.0.1-1 +- update to 2.0.1 +- move to /usr/share/php/Yoast/PHPUnitPolyfills2 +- raise dependency on PHP 5.6 +- drop phpunit7, add phpunit10 + +* Tue Apr 9 2024 Remi Collet - 1.1.1-1 +- update to 1.1.1 + +* Fri Mar 31 2023 Remi Collet - 1.0.5-1 +- update to 1.0.5 + +* Wed Nov 16 2022 Remi Collet - 1.0.4-1 +- update to 1.0.4 + +* Tue Nov 23 2021 Remi Collet - 1.0.3-1 +- update to 1.0.3 + +* Mon Oct 4 2021 Remi Collet - 1.0.2-1 +- update to 1.0.2 + +* Tue Aug 10 2021 Remi Collet - 1.0.1-1 +- update to 1.0.1 + +* Mon Jun 21 2021 Remi Collet - 1.0.0-1 +- update to 1.0.0 + +* Wed Mar 10 2021 Remi Collet - 0.2.0-2 +- reduce build matrix + +* Thu Nov 26 2020 Remi Collet - 0.2.0-1 +- initial rpm -- cgit