summaryrefslogtreecommitdiffstats
path: root/php-phpunit-FinderFacade.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-05-09 11:26:51 +0200
committerRemi Collet <remi@remirepo.net>2017-05-09 11:26:51 +0200
commitb2c3dab08a2c1682332a52bc7533754275d21781 (patch)
tree07865310da801863046f0390607f535a3dcf9bda /php-phpunit-FinderFacade.spec
parent34473f890cf45a998898ddcb125be9b5d464358c (diff)
switch to fedora-autoloader
Diffstat (limited to 'php-phpunit-FinderFacade.spec')
-rw-r--r--php-phpunit-FinderFacade.spec56
1 files changed, 29 insertions, 27 deletions
diff --git a/php-phpunit-FinderFacade.spec b/php-phpunit-FinderFacade.spec
index a8ec0df..f00fbc0 100644
--- a/php-phpunit-FinderFacade.spec
+++ b/php-phpunit-FinderFacade.spec
@@ -17,39 +17,37 @@
Name: php-phpunit-FinderFacade
Version: 1.2.1
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: Wrapper for Symfony Finder component
Group: Development/Libraries
License: BSD
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
-# Autoloader template
-Source1: autoload.php.in
-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}
BuildRequires: %{_bindir}/phpunit
+BuildRequires: php-composer(theseer/fdomdocument) < 2
BuildRequires: php-composer(theseer/fdomdocument) >= 1.3
-BuildRequires: php-composer(symfony/finder) >= 2.3
-BuildRequires: php-composer(symfony/class-loader)
+BuildRequires: php-composer(symfony/finder) < 4
+BuildRequires: php-composer(symfony/finder) >= 2.3
%endif
# From composer.json "require": {
# "theseer/fdomdocument": "~1.3",
# "symfony/finder": "~2.3|~3.0"
Requires: php(language) >= 5.3.3
-Requires: php-composer(theseer/fdomdocument) >= 1.3
Requires: php-composer(theseer/fdomdocument) < 2
-Requires: php-composer(symfony/finder) >= 2.3
+Requires: php-composer(theseer/fdomdocument) >= 1.3
Requires: php-composer(symfony/finder) < 4
+Requires: php-composer(symfony/finder) >= 2.3
# From phpcompatinfo report for version 1.2.1
Requires: php-ctype
# For our autoloader
-Requires: php-composer(symfony/class-loader)
+Requires: php-composer(fedora/autoloader)
Provides: php-composer(sebastian/finder-facade) = %{version}
# For compatibility with PEAR mode
@@ -67,38 +65,40 @@ Convenience wrapper for Symfony's Finder component.
%build
phpab \
--output src/autoload.php \
- --template %{SOURCE1} \
+ --template fedora2 \
src
+cat << 'EOF' | tee -a src/autoload.php
+\Fedora\Autoloader\Dependencies::required(array(
+ '%{php_home}/TheSeer/fDOMDocument/autoload.php',
+ array(
+ '%{php_home}/Symfony3/Component/Finder/autoload.php',
+ '%{php_home}/Symfony/Component/Finder/autoload.php',
+ ),
+));
+EOF
+
%install
-rm -rf %{buildroot}
mkdir -p %{buildroot}%{php_home}/SebastianBergmann
cp -pr src %{buildroot}%{php_home}/SebastianBergmann/FinderFacade
%if %{with_tests}
%check
-%{_bindir}/php \
- -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
- %{_bindir}/phpunit \
- --bootstrap %{buildroot}%{php_home}/SebastianBergmann/FinderFacade/autoload.php \
- --verbose tests
+php -r 'require "%{buildroot}%{php_home}/SebastianBergmann/FinderFacade/autoload.php";'
-if which php70; then
-php70 \
- -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
- %{_bindir}/phpunit \
+for cmd in php php56 php70 php71 php72; do
+ if which $cmd; then
+ $cmd -d include_path=.:%{buildroot}%{php_home}:%{php_home} \
+ %{_bindir}/phpunit \
--bootstrap %{buildroot}%{php_home}/SebastianBergmann/FinderFacade/autoload.php \
--verbose tests
-fi
+ fi
+done
%endif
-%clean
-rm -rf %{buildroot}
-
-
%post
if [ -x %{_bindir}/pear ]; then
%{_bindir}/pear uninstall --nodeps --ignore-errors --register-only \
@@ -107,7 +107,6 @@ fi
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc README.md
@@ -117,6 +116,9 @@ fi
%changelog
+* Tue May 9 2017 Remi Collet <remi@fedoraproject.org> - 1.2.1-3
+- switch to fedora/autoloader
+
* Wed Feb 17 2016 Remi Collet <remi@fedoraproject.org> - 1.2.1-1
- update to 1.2.1
- run test suite with both PHP 5 and 7 when available