# remirepo spec file for php-when, from # # Fedora spec file for php-when # # Copyright (c) 2019 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT # # Please preserve changelog entries # %global github_owner tplaner %global github_name When %global github_version 3.0.0 %global github_commit 09182e1707085382b8207c480120e96e98880563 %global composer_vendor tplaner %global composer_project when # "php": ">=7.1.3" %global php_min_ver 7.1.3 # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} %{!?phpdir: %global phpdir %{_datadir}/php} Name: php-when Version: %{github_version} Release: 1%{?github_release}%{?dist} Summary: Date/Calendar recursion library for PHP License: MIT URL: https://github.com/%{github_owner}/%{github_name} Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz BuildArch: noarch # Tests %if %{with_tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} BuildRequires: php-composer(phpunit/phpunit) ## phpcompatinfo (computed from version 3.0.0) BuildRequires: php-date BuildRequires: php-spl ## Autoloader BuildRequires: php-composer(fedora/autoloader) %endif # composer.json Requires: php(language) >= %{php_min_ver} # phpcompatinfo (computed from version 3.0.0) Requires: php-date Requires: php-spl # Standard "php-{COMPOSER_VENDOR}-{COMPOSER_PROJECT}" naming Provides: php-%{composer_vendor}-%{composer_project} = %{version}-%{release} # Composer Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} %description %{summary}. Autoloader: %{phpdir}/When/autoload.php %prep %setup -qn %{github_name}-%{github_commit} # Remove exec bit from doc file chmod a-x composer.json %build : Create autoloader cat <<'AUTOLOAD' | tee src/autoload.php - 3.0.0-1 - Update to 3.0.0 (RHBZ #1469514) - Rewrite spec and license it under the MIT license * Mon Dec 17 2012 Remi Collet - 0.3-2 - backport for remi repo. * Sat Dec 15 2012 Gregor Tätzner - 0.3-2 - enabled phpunit tests - moved tests to %%{_datadir}/tests/%%{name} * Tue Dec 11 2012 Gregor Tätzner - 0.3-1 - Initial package