summaryrefslogtreecommitdiffstats
path: root/php-consolidation-output-formatters.spec
diff options
context:
space:
mode:
authorShawn Iwinski <shawn@iwin.ski>2017-04-08 16:19:22 -0400
committerRemi Collet <remi@remirepo.net>2017-04-10 09:08:25 +0200
commitfdf384e9b16bc94e100bb0dc237c55a4cc30532a (patch)
tree9047a09fd17436a7846399d1dd7b12a8c9b0b78a /php-consolidation-output-formatters.spec
parent67434d4b8258784ae7594e65814f4892db1297f2 (diff)
Update to 3.1.8 (RHBZ #1428197)
- Allow Symfony 3 (cherry picked from commit 9e2182ae04bc5c0b3f2fdce084586d648631e6c9)
Diffstat (limited to 'php-consolidation-output-formatters.spec')
-rw-r--r--php-consolidation-output-formatters.spec45
1 files changed, 22 insertions, 23 deletions
diff --git a/php-consolidation-output-formatters.spec b/php-consolidation-output-formatters.spec
index 78a4724..8daa5d0 100644
--- a/php-consolidation-output-formatters.spec
+++ b/php-consolidation-output-formatters.spec
@@ -22,9 +22,8 @@
%global php_min_ver 5.4.0
# "symfony/console": "^2.8|~3"
# "symfony/finder": "~2.5|~3.0"
-# NOTE: Min version not 4.0 because v3 not packaged yet
%global symfony_min_ver 2.8
-%global symfony_max_ver 3.0
+%global symfony_max_ver 4.0
# Build using "--without tests" to disable tests
%global with_tests 0%{!?_without_tests:1}
@@ -33,7 +32,7 @@
Name: php-%{composer_vendor}-%{composer_project}
Version: %{github_version}
-Release: 1%{?github_release}%{?dist}
+Release: 2%{?github_release}%{?dist}
Summary: Format text by applying transformations provided by plug-in formatters
Group: Development/Libraries
@@ -41,7 +40,6 @@ License: MIT
URL: https://github.com/%{github_owner}/%{github_name}
Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# Tests
%if %{with_tests}
@@ -52,7 +50,7 @@ BuildRequires: php-composer(symfony/console) < %{symfony_max_ver}
BuildRequires: php-composer(symfony/console) >= %{symfony_min_ver}
BuildRequires: php-composer(symfony/finder) < %{symfony_max_ver}
BuildRequires: php-composer(symfony/finder) >= %{symfony_min_ver}
-## phpcompatinfo (computed from version 3.1.6)
+## phpcompatinfo (computed from version 3.1.8)
BuildRequires: php-dom
BuildRequires: php-json
BuildRequires: php-pcre
@@ -68,7 +66,7 @@ Requires: php-composer(symfony/console) < %{symfony_max_ver}
Requires: php-composer(symfony/console) >= %{symfony_min_ver}
Requires: php-composer(symfony/finder) < %{symfony_max_ver}
Requires: php-composer(symfony/finder) >= %{symfony_min_ver}
-# phpcompatinfo (computed from version 3.1.6)
+# phpcompatinfo (computed from version 3.1.8)
Requires: php-dom
Requires: php-json
Requires: php-pcre
@@ -103,15 +101,19 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Consolidation\\OutputFormatters\\', __DIR__);
\Fedora\Autoloader\Dependencies::required([
- '%{phpdir}/Symfony/Component/Console/autoload.php',
- '%{phpdir}/Symfony/Component/Finder/autoload.php',
+ [
+ '%{phpdir}/Symfony3/Component/Console/autoload.php',
+ '%{phpdir}/Symfony/Component/Console/autoload.php',
+ ],
+ [
+ '%{phpdir}/Symfony3/Component/Finder/autoload.php',
+ '%{phpdir}/Symfony/Component/Finder/autoload.php',
+ ],
]);
AUTOLOAD
%install
-rm -rf %{buildroot}
-
mkdir -p %{buildroot}%{phpdir}/Consolidation/OutputFormatters
cp -rp src/* %{buildroot}%{phpdir}/Consolidation/OutputFormatters/
@@ -129,27 +131,20 @@ BOOTSTRAP
rm -f tests/testAPIDocs.php
: Upstream tests
-%{_bindir}/phpunit --verbose --bootstrap bootstrap.php
-
-: Upstream tests with SCLs if available
-SCL_RETURN_CODE=0
-for SCL in %{?rhel:php55} php56 php70 php71; do
- if which $SCL; then
- $SCL %{_bindir}/phpunit --bootstrap bootstrap.php || SCL_RETURN_CODE=1
+RETURN_CODE=0
+for PHP_EXEC in php %{?rhel:php55} php56 php70 php71; do
+ if [ "php" == "$PHP_EXEC" ] || which $PHP_EXEC; then
+ $PHP_EXEC %{_bindir}/phpunit --verbose --bootstrap bootstrap.php \
+ || RETURN_CODE=1
fi
done
-exit $SCL_RETURN_CODE
+exit $RETURN_CODE
%else
: Tests skipped
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
@@ -159,6 +154,10 @@ rm -rf %{buildroot}
%changelog
+* Sat Apr 08 2017 Shawn Iwinski <shawn@iwin.ski> - 3.1.8-1
+- Update to 3.1.8 (RHBZ #1428197)
+- Allow Symfony 3
+
* Thu Mar 2 2017 Remi Collet <remi@remirepo.net> - 3.1.8-1
- Update to 3.1.8