# remirepo spec file for php-twig-extensions, from # # Fedora spec file for php-twig-extensions # # Copyright (c) 2014-2018 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT # # Please preserve changelog entries # %global github_owner twigphp %global github_name Twig-extensions %global github_version 1.5.3 %global github_commit e187386bea539a2cc2726689d6b4d468672a8ab4 %global composer_vendor twig %global composer_project extensions # "symfony/translation": "^2.7|^3.4" %global symfony_min_ver 2.7.1 %global symfony_max_ver 4.0 # "twig/twig": "^1.27|^2.0" %global twig_min_ver 1.27 %global twig_max_ver 3.0 # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} %{!?phpdir: %global phpdir %{_datadir}/php} Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} Release: 1%{?dist} Summary: Twig extensions Group: Development/Libraries License: MIT URL: http://twig-extensions.readthedocs.io/ 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: php-composer(phpunit/phpunit) ## composer.json %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(symfony/translation) >= %{symfony_min_ver} with php-composer(symfony/translation) < %{symfony_max_ver}) BuildRequires: (php-composer(twig/twig) >= %{twig_min_ver} with php-composer(twig/twig) < %{twig_max_ver}) %else BuildRequires: php-composer(symfony/translation) < %{symfony_max_ver} BuildRequires: php-composer(symfony/translation) >= %{symfony_min_ver} BuildRequires: php-composer(twig/twig) < 2 BuildRequires: php-composer(twig/twig) >= %{twig_min_ver} %endif ## phpcompatinfo (computed from version 1.5.2) BuildRequires: php(language) >= 5.3.0 BuildRequires: php-date BuildRequires: php-mbstring BuildRequires: php-pcre BuildRequires: php-spl ## Autoloader BuildRequires: php-composer(fedora/autoloader) %endif # composer.json %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(twig/twig) >= %{twig_min_ver} with php-composer(twig/twig) < %{twig_max_ver}) # composer.json: optional Requires: (php-composer(symfony/translation) >= %{symfony_min_ver} with php-composer(symfony/translation) < %{symfony_max_ver}) %else # v2 to not pull PHP 7 Requires: php-composer(twig/twig) < 2 Requires: php-composer(twig/twig) >= %{twig_min_ver} Requires: php-composer(symfony/translation) >= %{symfony_min_ver} Requires: php-composer(symfony/translation) < %{symfony_max_ver} %endif # phpcompatinfo (computed from version 1.5.2) Requires: php(language) >= 5.3.0 # Autoloader Requires: php-composer(fedora/autoloader) # Composer Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} %description Common additional features for Twig that do not directly belong in core Twig. Autoloader: %{phpdir}/Twig/Extensions/autoload.php %prep %setup -qn %{github_name}-%{github_commit} : Create autoloader cat <<'AUTOLOAD' | tee lib/Twig/Extensions/autoload.php - 1.5.3-1 - update to 1.5.3 * Tue Sep 4 2018 Remi Collet - 1.5.2-1 - update to 1.5.2 (no change) - use range dependencies - raise dependency on symfony/translation 2.7.1 * Sun Jul 09 2017 Shawn Iwinski - 1.5.1-1 - Update to 1.5.1 (RHBZ #1456812) - Add max version constraints to BuildRequires - Switch autoloader to php-composer(fedora/autoloader) - Add Symfony Translation to autoloader - Test with SCLs if available * Fri Jan 6 2017 Remi Collet - 1.4.1-2 - use Twig 2 when installed but ensure it is not pulled by defaut to avoid pulling PHP 7 * Wed Oct 26 2016 Remi Collet - 1.4.1-1 - update to 1.4.1 * Tue Oct 4 2016 Remi Collet - 1.4.0-2 - add upstream patch for test suite with twig 1.26 * Sun Sep 25 2016 Shawn Iwinski - 1.4.0-1 - Updated to 1.4.0 (RHBZ #1378643) * Fri Sep 23 2016 Remi Collet - 1.4.0-1 - update to 1.4.0 * Mon Oct 12 2015 Shawn Iwinski - 1.3.0-1 - Updated to 1.3.0 (RHBZ #1256169) - "php-phpunit-PHPUnit" build dependency changed to "php-composer(phpunit/phpunit)" - "twig/twig" dependency version changed from "~1.12" to "~1.20|~2.0" * Fri Nov 14 2014 Remi Collet - 1.2.0-2 - backport for remi repo, add EL-5 stuff * Thu Nov 13 2014 Shawn Iwinski - 1.2.0-2 - Conditional %%{?dist} - Removed color turn off and default timezone for phpunit - Removed "%%dir %%{phpdir}/Twig" from %%files * Sun Nov 02 2014 Shawn Iwinski - 1.2.0-1 - Initial package