From 29367eded7cfccf1129ec6278a02f72364800b5b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 31 Oct 2016 14:40:23 +0100 Subject: [PATCH] switch to fedora/autoloader --- php-sebastian-code-unit-reverse-lookup.spec | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/php-sebastian-code-unit-reverse-lookup.spec b/php-sebastian-code-unit-reverse-lookup.spec index 1b62544..db8a88d 100644 --- a/php-sebastian-code-unit-reverse-lookup.spec +++ b/php-sebastian-code-unit-reverse-lookup.spec @@ -21,7 +21,7 @@ Name: php-sebastian-%{gh_project} Version: 1.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Looks up which function or method a line of code belongs to Group: Development/Libraries @@ -31,7 +31,7 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit BuildArch: noarch BuildRequires: php(language) >= 5.6 -BuildRequires: %{_bindir}/phpab +BuildRequires: php-fedora-autoloader-devel %if %{with_tests} # from composer.json, "require-dev": { # "phpunit/phpunit": "~5" @@ -44,6 +44,8 @@ BuildRequires: php-composer(phpunit/phpunit) Requires: php(language) >= 5.6 # From phpcompatinfo report for version 1.0.0 Requires: php-reflection +# Autoloader +Requires: php-composer(fedora/autoloader) Provides: php-composer(sebastian/%{gh_project}) = %{version} @@ -60,7 +62,7 @@ Autoloader: %{php_home}/%{ns_name}/autoload.php %build # Generate the Autoloader -phpab --output src/autoload.php src +phpab --template fedora --output src/autoload.php src %install @@ -76,19 +78,16 @@ cat << 'EOF' | tee vendor/autoload.php require 'SebastianBergmann/%{ns_name}/autoload.php'; EOF +: Run upstream test suite %{_bindir}/php -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \ %{_bindir}/phpunit --verbose - -if which php70; then - php70 -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \ - %{_bindir}/phpunit --verbose -fi %else : bootstrap build with test suite disabled %endif %files +%{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md %doc composer.json @@ -97,5 +96,8 @@ fi %changelog +* Mon Oct 31 2016 Remi Collet - 1.0.0-2 +- switch to fedora/autoloader + * Sat Feb 13 2016 Remi Collet - 1.0.0-1 - initial package \ No newline at end of file