# remirepo spec file for php-pimple, from: # # Fedora spec file for php-pimple # # Copyright (c) 2015-2018 Shawn Iwinski # Christian Glombek # # License: MIT # http://opensource.org/licenses/MIT # # Please preserve changelog entries # %global github_owner silexphp %global github_name Pimple %global github_version 3.5.0 %global github_commit a94b3a4db7fb774b3d78dad2315ddc07629e1bed %global composer_vendor pimple %global composer_project pimple # "php": ">=5.3.0" %global php_min_ver 7.2.5 # "psr/container": "^1.1|^2.0" %global psr_container_min_ver 1.1 %global psr_container_max_ver 3.0 # "symfony/phpunit-bridge": "^5.4@dev" # symfony5 isn't in the repos, but 4.4 works as well %global phpunit_bridge_min_ver 4.4 %global phpunit_bridge_max_ver 6.0 # Build using "--without tests" to disable tests %global with_tests %{?_without_tests:0}%{!?_without_tests:1} %{!?phpdir: %global phpdir %{_datadir}/php} Name: php-%{composer_project} Version: %{github_version} Release: 1%{?dist} Summary: A simple dependency injection container for PHP Group: Development/Libraries License: MIT URL: http://pimple.sensiolabs.org Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz BuildArch: noarch # Tests %if %{with_tests} BuildRequires: phpunit8 ## composer.json %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires:(php-composer(psr/container) >= %{psr_container_min_ver} with php-composer(psr/container) < %{psr_container_max_ver}) BuildRequires:(php-composer(symfony/phpunit-bridge) >= %{phpunit_bridge_min_ver} with php-composer(symfony/phpunit-bridge) < %{phpunit_bridge_max_ver}) %else BuildRequires: php-psr-container2 BuildRequires: php-symfony4-phpunit-bridge %endif ## phpcompatinfo (computed from version 3.5.0) BuildRequires: php-reflection BuildRequires: php-spl ## Autoloader BuildRequires: php-composer(fedora/autoloader) %endif # composer.json Requires: php(language) >= %{php_min_ver} %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(psr/container) >= %{psr_container_min_ver} with php-composer(psr/container) < %{psr_container_max_ver}) %else Requires: php-psr-container2 %endif # phpcompatinfo (computed from version 3.2.3) Requires: php-spl ## Autoloader Requires: php-composer(fedora/autoloader) # Composer Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} # Rename Obsoletes: php-Pimple < %{version}-%{release} Provides: php-Pimple = %{version}-%{release} # Drop extension Obsoletes: php-pimple-lib < %{version}-%{release} Provides: php-pimple-lib = %{version}-%{release} %description %{summary}. Autoloader: %{phpdir}/Pimple/autoload.php %prep %setup -qn %{github_name}-%{github_commit} %build : Create autoloader cat <<'AUTOLOAD' | tee src/Pimple/autoload.php - 3.5.0-1 - update to 3.5.0, from Fedora - switch to phpunit8 - use range dependencies * Thu Feb 22 2018 Remi Collet - 3.2.3-1 - sync with rawhide spec * Fri Feb 09 2018 Christian Glombek - 3.2.3-1 - Update to 3.2.3 (RHBZ #1467881) * Sat Aug 05 2017 Shawn Iwinski - 3.2.2-1 - Update to 3.2.2 (RHBZ #1467881) - Drop extension completely - Switch autoloader to php-composer(fedora/autoloader) - Test with SCLs if available * Wed Aug 5 2015 Remi Collet - 3.0.1-1 - backport for #remirepo - adapt for SCL - drop library subpackage in SCL * Sun Aug 02 2015 Shawn Iwinski - 3.0.1-1 - Updated to 3.0.1 * Mon Jul 20 2015 Shawn Iwinski - 3.0.0-5 - Autoloader changed to Symfony ClassLoader * Thu May 21 2015 Shawn Iwinski - 3.0.0-4 - Add library autoloader - Spec cleanup * Wed Sep 03 2014 Shawn Iwinski - 3.0.0-3 - Separate extension and library (i.e. sub-package library) * Mon Aug 25 2014 Shawn Iwinski - 3.0.0-2 - Fixed compat file location in description - Included real class in compat file - Always run extension minimal load test - Fixed test suite with previous installed version - "make test NO_INTERACTION=1 REPORT_EXIT_STATUS=1" instead of "echo "n" | make test" * Thu Jul 31 2014 Shawn Iwinski - 3.0.0-1 - Updated to 3.0.0 - Added custom compat file for obsoleted php-Pimple * Tue Jul 29 2014 Shawn Iwinski - 2.1.1-1 - Initial package