From 1254fdaaa5caa8ddbcafcb718b613f19504a4872 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 17 Nov 2016 18:14:24 +0100 Subject: php-phpunit-comparator: 1.2.1 --- composer.json | 44 +++++++++++++++++++++++++++++++++++++++ php-phpunit-comparator.spec | 50 +++++++++++++++++++++++++++++++++++---------- 2 files changed, 83 insertions(+), 11 deletions(-) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..79f0803 --- /dev/null +++ b/composer.json @@ -0,0 +1,44 @@ +{ + "name": "sebastian/comparator", + "description": "Provides the functionality to compare PHP values for equality", + "keywords": ["comparator","compare","equality"], + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "license": "BSD-3-Clause", + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + } +} + diff --git a/php-phpunit-comparator.spec b/php-phpunit-comparator.spec index e546f96..8df7eca 100644 --- a/php-phpunit-comparator.spec +++ b/php-phpunit-comparator.spec @@ -7,11 +7,13 @@ # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit 937efb279bd37a375bcadf584dec0726f84dbf22 +%global gh_commit ce2bda23a56456f19e35d98241446b581f648c14 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner sebastianbergmann %global gh_project comparator %global php_home %{_datadir}/php +%global ns_vendor SebastianBergmann +%global ns_project Comparator %if %{bootstrap} %global with_tests %{?_with_tests:1}%{!?_with_tests:0} %else @@ -19,7 +21,7 @@ %endif Name: php-phpunit-comparator -Version: 1.2.0 +Version: 1.2.1 Release: 1%{?dist} Summary: Compare PHP values for equality @@ -31,7 +33,7 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: php(language) >= 5.3.3 -BuildRequires: %{_bindir}/phpab +BuildRequires: php-fedora-autoloader-devel %if %{with_tests} # from composer.json, "require-dev": { # "phpunit/phpunit": "~4.4" @@ -51,6 +53,8 @@ Requires: php-composer(sebastian/exporter) < 2 Requires: php-date Requires: php-dom Requires: php-spl +# Autoloader +Requires: php-composer(fedora/autoloader) Provides: php-composer(sebastian/comparator) = %{version} @@ -58,6 +62,8 @@ Provides: php-composer(sebastian/comparator) = %{version} %description This component provides the functionality to compare PHP values for equality. +Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}/autoload.php + %prep %setup -q -n %{gh_project}-%{gh_commit} @@ -65,20 +71,21 @@ This component provides the functionality to compare PHP values for equality. %build # Generate the Autoloader -phpab --output src/autoload.php src +phpab --template fedora --output src/autoload.php src # Rely on include_path as in PHPUnit dependencies cat <phpunit.xml +# remirepo:13 +run=0 +ret=0 +if which php56; then + php56 -d include_path=.:%{buildroot}%{php_home}:%{php_home} \ + %{_bindir}/phpunit || ret=1 + run=1 +fi +if which php71; then + php71 -d include_path=.:%{buildroot}%{php_home}:%{php_home} \ + %{_bindir}/phpunit || ret=1 + run=1 +fi +if [ $run -eq 0 ]; then %{_bindir}/php -d include_path=.:%{buildroot}%{php_home}:%{php_home} \ -%{_bindir}/phpunit +%{_bindir}/phpunit --verbose +# remirepo:2 +fi +exit $ret %else : bootstrap build with test suite disabled %endif @@ -103,10 +127,14 @@ rm -rf %{buildroot} %{!?_licensedir:%global license %%doc} %license LICENSE -%{php_home}/SebastianBergmann/Comparator +%{php_home}/%{ns_vendor}/%{ns_project} %changelog +* Thu Nov 17 2016 Remi Collet - 1.2.1-1 +- update to 1.2.1 +- switch to fedora/autoloader + * Sun Jul 26 2015 Remi Collet - 1.2.0-1 - update to 1.2.0 @@ -129,4 +157,4 @@ rm -rf %{buildroot} - add composer dependencies * Sat May 3 2014 Remi Collet - 1.0.0-1 -- initial package \ No newline at end of file +- initial package -- cgit