# remirepo/fedora spec file for php-dasprid-enum # # Copyright (c) 2019-2024 Remi Collet # License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %bcond_without tests %global gh_commit 8dfd07c6d2cf31c8da90c53b83c026c7696dda90 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner DASPRiD %global gh_project Enum %global pk_vendor dasprid %global pk_project enum %global ns_vendor %{gh_owner} %global ns_project %{gh_project} %global php_home %{_datadir}/php %global major %nil Name: php-%{pk_vendor}-%{pk_project}%{major} Version: 1.0.6 Release: 1%{?dist} Summary: PHP enum implementation License: BSD-2-Clause URL: https://github.com/%{gh_owner}/%{gh_project} # git snapshot to retrieve test suite removed by .gitattributes Source0: %{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh BuildArch: noarch %if %{with tests} # For tests BuildRequires: php(language) BuildRequires: php-reflection BuildRequires: php-spl # From composer.json, "require-dev": { # "phpunit/phpunit": "^7 || ^8 || ^9 || ^10 || ^11", # "squizlabs/php_codesniffer": "^3.4" %global phpunit %{_bindir}/phpunit10 BuildRequires: %{phpunit} # Required by autoloader BuildRequires: php-composer(fedora/autoloader) %endif # From composer.json, "require": { # nothing Requires: php(language) # From phpcompatinfo report for version 1.0.0 Requires: php-reflection Requires: php-spl # Required by autoloader Requires: php-composer(fedora/autoloader) Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version} %description It is a well known fact that PHP is missing a basic enum type, ignoring the rather incomplete SplEnum implementation which is only available as a PECL extension. There are also quite a few other userland enum implementations around, but all of them have one or another compromise. This library tries to close that gap as far as PHP allows it to. Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} cat << 'EOF' | tee src/autoload.php - 1.0.6-1 - update to 1.0.6 (no change) - switch to phpunit10 * Tue Aug 29 2023 Remi Collet - 1.0.5-1 - update to 1.0.5 (no change) - sources from git snapshot * Thu Mar 2 2023 Remi Collet - 1.0.4-1 - update to 1.0.4 * Mon Oct 5 2020 Remi Collet - 1.0.3-1 - update to 1.0.3 * Tue Aug 11 2020 Remi Collet - 1.0.2-1 - update to 1.0.2 - switch to phpunit9 - drop patch merged upstream * Thu Oct 19 2017 Remi Collet - 1.0.0-1 - initial package, version 1.0.0 - add license file from https://github.com/DASPRiD/Enum/pull/2