switch to fedora/autoloader
This commit is contained in:
parent
8301cad30a
commit
29367eded7
1 changed files with 10 additions and 8 deletions
|
|
@ -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 <remi@fedoraproject.org> - 1.0.0-2
|
||||
- switch to fedora/autoloader
|
||||
|
||||
* Sat Feb 13 2016 Remi Collet <remi@fedoraproject.org> - 1.0.0-1
|
||||
- initial package
|
||||
Loading…
Add table
Add a link
Reference in a new issue