summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-06-12 16:11:01 +0200
committerRemi Collet <remi@remirepo.net>2019-06-12 16:11:01 +0200
commit8f78076a0c3812325ffdfb0f76bb9cca7bfc7917 (patch)
treea8df8d44d7efdcb9d044979a80eea6398294b69c
parentb370bc529bde643b06f344d39eee94c1c4ab9556 (diff)
v3.5.0 from FedoraHEADmaster
-rw-r--r--composer.json59
l---------makesrc.sh1
-rwxr-xr-xphp-consolidation-output-formatters-get-source.sh74
-rw-r--r--php-consolidation-output-formatters.spec45
4 files changed, 156 insertions, 23 deletions
diff --git a/composer.json b/composer.json
index 604b44c..e8d9a04 100644
--- a/composer.json
+++ b/composer.json
@@ -20,15 +20,15 @@
},
"require": {
"php": ">=5.4.0",
+ "dflydev/dot-access-data": "^1.1.0",
"symfony/console": "^2.8|^3|^4",
"symfony/finder": "^2.5|^3|^4"
},
"require-dev": {
- "g-1-a/composer-test-scenarios": "^2",
- "satooshi/php-coveralls": "^2",
+ "g1a/composer-test-scenarios": "^3",
+ "php-coveralls/php-coveralls": "^1",
"phpunit/phpunit": "^5.7.27",
"squizlabs/php_codesniffer": "^2.7",
- "symfony/console": "3.2.3",
"symfony/var-dumper": "^2.8|^3|^4",
"victorjonsson/markdowndocs": "^1.3"
},
@@ -55,16 +55,55 @@
"@lint",
"@unit",
"@cs"
- ],
- "scenario": "scenarios/install",
- "post-update-cmd": [
- "create-scenario symfony4 'symfony/console:^4.0' 'phpunit/phpunit:^6' --platform-php '7.1.3'",
- "create-scenario symfony3 'symfony/console:^3.4' 'symfony/finder:^3.4' 'symfony/var-dumper:^3.4' --platform-php '5.6.32'",
- "create-scenario symfony2 'symfony/console:^2.8' 'phpunit/phpunit:^4.8.36' --remove 'satooshi/php-coveralls' --platform-php '5.4' --no-lockfile",
- "dependency-licenses"
]
},
"extra": {
+ "scenarios": {
+ "symfony4": {
+ "require": {
+ "symfony/console": "^4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6"
+ },
+ "config": {
+ "platform": {
+ "php": "7.1.3"
+ }
+ }
+ },
+ "symfony3": {
+ "require": {
+ "symfony/console": "^3.4",
+ "symfony/finder": "^3.4",
+ "symfony/var-dumper": "^3.4"
+ },
+ "config": {
+ "platform": {
+ "php": "5.6.32"
+ }
+ }
+ },
+ "symfony2": {
+ "require": {
+ "symfony/console": "^2.8"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.36"
+ },
+ "remove": [
+ "php-coveralls/php-coveralls"
+ ],
+ "config": {
+ "platform": {
+ "php": "5.4.8"
+ }
+ },
+ "scenario-options": {
+ "create-lockfile": "false"
+ }
+ }
+ },
"branch-alias": {
"dev-master": "3.x-dev"
}
diff --git a/makesrc.sh b/makesrc.sh
new file mode 120000
index 0000000..11bb7a8
--- /dev/null
+++ b/makesrc.sh
@@ -0,0 +1 @@
+php-consolidation-output-formatters-get-source.sh \ No newline at end of file
diff --git a/php-consolidation-output-formatters-get-source.sh b/php-consolidation-output-formatters-get-source.sh
new file mode 100755
index 0000000..ce6064d
--- /dev/null
+++ b/php-consolidation-output-formatters-get-source.sh
@@ -0,0 +1,74 @@
+#/bin/sh
+
+GIT=`which git`
+RPM=`which rpm`
+
+if [ -z "$GIT" ]
+then
+ echo "ERROR: 'git' command not found" 1>&2
+ exit 1
+elif [ -z "$RPM" ]
+then
+ echo "ERROR: 'rpm' command not found" 1>&2
+ exit 1
+fi
+
+function print {
+ echo -e "\e[0;33m>>>>> ${1}\e[0m"
+}
+
+if [ -x "$1" ]
+then
+ SPEC=$1
+else
+ SPEC=`ls *.spec | head -1`
+fi
+
+SPEC_DIR=`pwd`
+
+print "SPEC_DIR = $SPEC_DIR"
+
+NAME=`echo $SPEC | sed 's#\.spec##'`
+VERSION=`egrep '%global\s*github_version' $SPEC | awk '{print $3}'`
+
+print "SPEC = $SPEC"
+print "NAME = $NAME"
+
+GIT_OWNER=`egrep '%global\s*github_owner' $SPEC | awk '{print $3}'`
+GIT_NAME=`egrep '%global\s*github_name' $SPEC | awk '{print $3}'`
+GIT_COMMIT=`egrep '%global\s*github_commit' $SPEC | awk '{print $3}'`
+GIT_REPO=https://github.com/${GIT_OWNER}/${GIT_NAME}
+GIT_DIR=`echo $GIT_REPO | sed 's#.*/##'`
+
+print "GIT_OWNER = $GIT_OWNER"
+print "GIT_NAME = $GIT_NAME"
+print "GIT_COMMIT = $GIT_COMMIT"
+print "GIT_REPO = $GIT_REPO"
+print "GIT_DIR = $GIT_DIR"
+
+TEMP_DIR=$(mktemp --dir)
+
+pushd $TEMP_DIR
+ print "Cloning git repo..."
+ $GIT clone $GIT_REPO
+
+ pushd $GIT_DIR
+ print "Checking out commit..."
+ $GIT checkout $GIT_COMMIT
+ cp composer.json ${SPEC_DIR}
+ popd
+
+ TAR_DIR=${GIT_NAME}-${GIT_COMMIT}
+ print "TAR_DIR = $TAR_DIR"
+
+ mv $GIT_DIR $TAR_DIR
+
+ TAR_FILE=${SPEC_DIR}/${NAME}-${VERSION}-${GIT_COMMIT}.tar.gz
+ print "TAR_FILE = $TAR_FILE"
+
+ [ -e $TAR_FILE ] && rm -f $TAR_FILE
+ tar --exclude-vcs -czf $TAR_FILE $TAR_DIR
+ chmod 0644 $TAR_FILE
+popd
+
+rm -rf $TEMP_DIR
diff --git a/php-consolidation-output-formatters.spec b/php-consolidation-output-formatters.spec
index 94be8d1..ec945ea 100644
--- a/php-consolidation-output-formatters.spec
+++ b/php-consolidation-output-formatters.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-consolidation-output-formatters
#
-# Copyright (c) 2016-2018 Shawn Iwinski <shawn@iwin.ski>
+# Copyright (c) 2016-2019 Shawn Iwinski <shawn@iwin.ski>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -10,16 +10,19 @@
# Please preserve changelog entries
#
-%global github_owner consolidation-org
+%global github_owner consolidation
%global github_name output-formatters
-%global github_version 3.2.0
-%global github_commit da889e4bce19f145ca4ec5b1725a946f4eb625a9
+%global github_version 3.5.0
+%global github_commit 99ec998ffb697e0eada5aacf81feebfb13023605
%global composer_vendor consolidation
%global composer_project output-formatters
# "php": ">=5.4.0"
%global php_min_ver 5.4.0
+# "dflydev/dot-access-data": "^1.1.0"
+%global dflydev_dot_access_data_min_ver 1.1.0
+%global dflydev_dot_access_data_max_ver 2.0
# "symfony/console": "^2.8|^3|^4"
# "symfony/finder": "^2.5|^3|^4"
%global symfony_min_ver 2.8
@@ -36,13 +39,16 @@
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
License: MIT
URL: https://github.com/%{github_owner}/%{github_name}
-Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
+
+# GitHub export does not include tests
+# Run php-consolidation-output-formatters-get-source.sh to create full source
+Source0: %{name}-%{github_version}-%{github_commit}.tar.gz
+Source1: %{name}-get-source.sh
BuildArch: noarch
# Tests
@@ -51,15 +57,18 @@ BuildArch: noarch
BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: php-composer(phpunit/phpunit)
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-composer(dflydev/dot-access-data) >= %{dflydev_dot_access_data_min_ver} with php-composer(dflydev/dot-access-data) < %{dflydev_dot_access_data_max_ver})
BuildRequires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver})
BuildRequires: (php-composer(symfony/finder) >= %{symfony_min_ver} with php-composer(symfony/finder) < %{symfony_max_ver})
BuildRequires: (php-composer(symfony/var-dumper) >= %{symfony_min_ver} with php-composer(symfony/var-dumper) < %{symfony_max_ver})
%else
+BuildRequires: php-composer(dflydev/dot-access-data) < %{dflydev_dot_access_data_max_ver}
+BuildRequires: php-composer(dflydev/dot-access-data) >= %{dflydev_dot_access_data_min_ver}
BuildRequires: php-composer(symfony/console) < %{symfony_max_ver}
BuildRequires: php-composer(symfony/finder) < %{symfony_max_ver}
BuildRequires: php-composer(symfony/var-dumper) < %{symfony_max_ver}
%endif
-## phpcompatinfo (computed from version 3.1.13)
+## phpcompatinfo (computed from version 3.5.0)
BuildRequires: php-dom
BuildRequires: php-json
BuildRequires: php-pcre
@@ -72,13 +81,16 @@ BuildRequires: php-composer(fedora/autoloader)
# composer.json
Requires: php(language) >= %{php_min_ver}
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Requires: (php-composer(dflydev/dot-access-data) >= %{dflydev_dot_access_data_min_ver} with php-composer(dflydev/dot-access-data) < %{dflydev_dot_access_data_max_ver})
Requires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver})
Requires: (php-composer(symfony/finder) >= %{symfony_min_ver} with php-composer(symfony/finder) < %{symfony_max_ver})
%else
+Requires: php-composer(dflydev/dot-access-data) < %{dflydev_dot_access_data_max_ver}
+Requires: php-composer(dflydev/dot-access-data) >= %{dflydev_dot_access_data_min_ver}
Requires: php-composer(symfony/console) < %{symfony_max_ver}
Requires: php-composer(symfony/finder) < %{symfony_max_ver}
%endif
-# phpcompatinfo (computed from version 3.1.13)
+# phpcompatinfo (computed from version 3.5.0)
Requires: php-dom
Requires: php-json
Requires: php-pcre
@@ -118,6 +130,7 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Consolidation\\OutputFormatters\\', __DIR__);
\Fedora\Autoloader\Dependencies::required([
+ '%{phpdir}/Dflydev/DotAccessData/autoload.php',
[
'%{phpdir}/Symfony4/Component/Console/autoload.php',
'%{phpdir}/Symfony3/Component/Console/autoload.php',
@@ -141,8 +154,8 @@ AUTOLOAD
%install
-mkdir -p %{buildroot}%{phpdir}/Consolidation/OutputFormatters
-cp -rp src/* %{buildroot}%{phpdir}/Consolidation/OutputFormatters/
+mkdir -p %{buildroot}%{phpdir}/Consolidation
+cp -rp src %{buildroot}%{phpdir}/Consolidation/OutputFormatters
%check
@@ -155,12 +168,12 @@ require_once '%{buildroot}%{phpdir}/Consolidation/OutputFormatters/autoload.php'
BOOTSTRAP
: Skip API documentation test
-rm -f tests/testAPIDocs.php
+rm -f tests/APIDocsTest.php
: Upstream tests
RETURN_CODE=0
PHPUNIT=$(which phpunit)
-for PHP_EXEC in "" %{?rhel:php55 php56} php70 php71 php72; do
+for PHP_EXEC in "" %{?rhel:php55 php56 php70} php71 php72 php73 php74; do
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
$PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
|| RETURN_CODE=1
@@ -182,6 +195,12 @@ exit $RETURN_CODE
%changelog
+* Sat Jun 01 2019 Shawn Iwinski <shawn@iwin.ski> - 3.5.0-2
+- Fix sources
+
+* Sat Jun 01 2019 Shawn Iwinski <shawn@iwin.ski> - 3.5.0-1
+- Update to 3.5.0 (RHBZ #1582691)
+
* Fri Mar 30 2018 Shawn Iwinski <shawn@iwin.ski> - 3.2.0-1
- Update to 3.2.0 (RHBZ #1505200)