# remirepo spec file for php-twig-extensions, from # # Fedora spec file for php-twig-extensions # # Copyright (c) 2014-2017 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.1 %global github_commit d188c76168b853481cc75879ea045bf93d718e9c %global composer_vendor twig %global composer_project extensions # "symfony/translation": "~2.3|~3.0" # NOTE: Min version not 2.3 because autoloader required %global symfony_min_ver %{?el6:2.3.31}%{!?el6: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 BuildRequires: php-composer(symfony/translation) >= %{symfony_min_ver} BuildRequires: php-composer(symfony/translation) < %{symfony_max_ver} BuildRequires: php-composer(twig/twig) >= %{twig_min_ver} %if 0%{?fedora} < 25 BuildRequires: php-composer(twig/twig) < 2 %else BuildRequires: php-composer(twig/twig) < %{twig_max_ver} %endif ## phpcompatinfo (computed from version 1.5.1) 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} < 25 Requires: php-composer(twig/twig) < 2 %else Requires: php-composer(twig/twig) < %{twig_max_ver} %endif Requires: php-composer(twig/twig) >= %{twig_min_ver} # composer.json: optional Requires: php-composer(symfony/translation) >= %{symfony_min_ver} Requires: php-composer(symfony/translation) < %{symfony_max_ver} # phpcompatinfo (computed from version 1.5.1) 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.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