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 --- php-phpunit-comparator.spec | 50 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 11 deletions(-) (limited to 'php-phpunit-comparator.spec') 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