Blame php-sebastian-exporter3.spec

4036f1
# remirepo/fedora spec file for php-sebastian-exporter3
4036f1
#
2af1dc
# Copyright (c) 2013-2019 Remi Collet
4036f1
# License: CC-BY-SA
4036f1
# http://creativecommons.org/licenses/by-sa/4.0/
4036f1
#
4036f1
# Please, preserve the changelog entries
4036f1
#
de777e
%global bootstrap    0
ae29da
%global gh_commit    68609e1261d215ea5b21b7987539cbfbe156ec3e
4036f1
%global gh_short     %(c=%{gh_commit}; echo ${c:0:7})
4036f1
%global gh_owner     sebastianbergmann
4036f1
%global gh_project   exporter
4036f1
%global pk_vendor    sebastian
4036f1
%global pk_project   %{gh_project}
4036f1
%global major        3
4036f1
%global php_home     %{_datadir}/php
4036f1
%global pear_name    Exporter
4036f1
%global pear_channel pear.phpunit.de
4036f1
%if %{bootstrap}
4036f1
%global with_tests   %{?_with_tests:1}%{!?_with_tests:0}
4036f1
%else
4036f1
%global with_tests   %{?_without_tests:0}%{!?_without_tests:1}
4036f1
%endif
4036f1
4036f1
Name:           php-%{pk_vendor}-%{pk_project}%{major}
ae29da
Version:        3.1.2
2af1dc
Release:        1%{?dist}
4036f1
Summary:        Export PHP variables for visualization
4036f1
4036f1
License:        BSD
4036f1
URL:            https://github.com/%{gh_owner}/%{gh_project}
4036f1
Source0:        https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
4036f1
4036f1
BuildArch:      noarch
4036f1
BuildRequires:  php(language) >= 7.0
c40701
BuildRequires:  php-fedora-autoloader-devel >= 1.0.0
4036f1
%if %{with_tests}
4036f1
# from composer.json, "require-dev": {
4036f1
#        "phpunit/phpunit": "^6.0",
4036f1
#        "ext-mbstring": "*"
4036f1
BuildRequires:  phpunit6
4036f1
BuildRequires:  php-mbstring
df3a38
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
f54af6
BuildRequires:  (php-composer(%{pk_vendor}/recursion-context) >= 3.0 with php-composer(%{pk_vendor}/recursion-context) < 4)
f54af6
%else
f54af6
BuildRequires:  php-sebastian-recursion-context3
f54af6
%endif
4036f1
%endif
4036f1
4036f1
# from composer.json
4036f1
#        "php": "^7.0",
4036f1
#        "sebastian/recursion-context": "^3.0"
4036f1
Requires:       php(language) >= 7.0
df3a38
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
f54af6
Requires:       (php-composer(%{pk_vendor}/recursion-context) >= 3.0 with php-composer(%{pk_vendor}/recursion-context) < 4)
f54af6
%else
f54af6
Requires:       php-sebastian-recursion-context3
f54af6
%endif
4036f1
# from phpcompatinfo report for version 3.0.0
4036f1
Requires:       php-mbstring
4036f1
Requires:       php-pcre
4036f1
Requires:       php-spl
4036f1
# Autoloader
4036f1
Requires:       php-composer(fedora/autoloader)
4036f1
4036f1
Provides:       php-composer(%{pk_vendor}/%{pk_project}) = %{version}
4036f1
4036f1
4036f1
%description
4036f1
Provides the functionality to export PHP variables for visualization.
4036f1
4036f1
4036f1
%prep
4036f1
%setup -q -n %{gh_project}-%{gh_commit}
4036f1
4036f1
4036f1
%build
4036f1
# generate the Autoloader
2af1dc
phpab --template fedora --output src/autoload.php src
4036f1
4036f1
# Rely on include_path as in PHPUnit dependencies
4036f1
cat <
4036f1
// Dependency' autoloader
4036f1
require_once 'SebastianBergmann/RecursionContext3/autoload.php';
4036f1
EOF
4036f1
4036f1
4036f1
%install
4036f1
mkdir -p   %{buildroot}%{php_home}/SebastianBergmann
4036f1
cp -pr src %{buildroot}%{php_home}/SebastianBergmann/Exporter%{major}
4036f1
4036f1
4036f1
%if %{with_tests}
4036f1
%check
4036f1
mkdir vendor
4036f1
touch vendor/autoload.php
4036f1
4036f1
: Run upstream test suite
4036f1
ret=0
2af1dc
for cmd in php php70 php71 php72 php73 php74; do
4036f1
  if which $cmd; then
4036f1
    %{_bindir}/php -d include_path=.:%{buildroot}%{_datadir}/php:%{_datadir}/php \
4036f1
    %{_bindir}/phpunit6  --verbose || ret=1
4036f1
  fi
4036f1
done
4036f1
exit $ret
4036f1
%endif
4036f1
4036f1
4036f1
%files
4036f1
%{!?_licensedir:%global license %%doc}
4036f1
%license LICENSE
4036f1
%doc README.md
4036f1
%doc composer.json
4036f1
%{php_home}/SebastianBergmann/Exporter%{major}
4036f1
4036f1
4036f1
%changelog
ae29da
* Sun Sep 15 2019 Remi Collet <remi@remirepo.net> - 3.1.2-1
ae29da
- update to 3.1.2
ae29da
2af1dc
* Mon Aug 12 2019 Remi Collet <remi@remirepo.net> - 3.1.1-1
2af1dc
- update to 3.1.1
2af1dc
ee825a
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-7
ee825a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
ee825a
5a45b3
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-6
5a45b3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
5a45b3
df3a38
* Thu Dec  6 2018 Remi Collet <remi@remirepo.net> - 3.1.0-5
df3a38
- cleanup for EL-8
df3a38
35bc5a
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-4
35bc5a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
35bc5a
f54af6
* Tue Feb  6 2018 Remi Collet <remi@remirepo.net> - 3.1.0-3
f54af6
- use range dependencies on F27+
f54af6
dce461
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-2
dce461
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
dce461
c40701
* Mon Apr  3 2017 Remi Collet <remi@remirepo.net> - 3.1.0-1
c40701
- Update to 3.1.0
c40701
de777e
* Mon Mar 13 2017 Remi Collet <remi@remirepo.net> - 3.0.0-2
de777e
- non bootstrap build
de777e
4036f1
* Fri Mar  3 2017 Remi Collet <remi@fedoraproject.org> - 3.0.0-1
4036f1
- update to 3.0.0
4036f1
- rename to php-sebastian-exporter3
4036f1
- raise dependency on PHP 7
4036f1
- raise dependency on recursion-context 3
4036f1
4036f1
* Tue Nov 22 2016 Remi Collet <remi@fedoraproject.org> - 2.0.0-1
4036f1
- update to 2.0.0
4036f1
- raise dependency on sebastian/recursion-context 2.0
4036f1
- switch to fedora/autoloader
4036f1
4036f1
* Fri Jun 17 2016 Remi Collet <remi@fedoraproject.org> - 1.2.2-1
4036f1
- update to 1.2.2
4036f1
- run test suite with both PHP 5 and 7 when available
4036f1
4036f1
* Sun Jul 26 2015 Remi Collet <remi@fedoraproject.org> - 1.2.1-1
4036f1
- update to 1.2.1 (only CS)
4036f1
4036f1
* Fri Jan 30 2015 Remi Collet <remi@fedoraproject.org> - 1.2.0-1
4036f1
- update to 1.2.0
4036f1
4036f1
* Sat Jan 24 2015 Remi Collet <remi@fedoraproject.org> - 1.1.0-1
4036f1
- update to 1.1.0
4036f1
- add dependency on sebastian/recursion-context
4036f1
4036f1
* Sun Oct  5 2014 Remi Collet <remi@fedoraproject.org> - 1.0.2-1
4036f1
- update to 1.0.2
4036f1
- enable test suite
4036f1
4036f1
* Fri Jul 18 2014 Remi Collet <remi@fedoraproject.org> - 1.0.1-4
4036f1
- add composer dependencies
4036f1
4036f1
* Wed Apr 30 2014 Remi Collet <remi@fedoraproject.org> - 1.0.1-2
4036f1
- cleanup pear registry
4036f1
4036f1
* Sun Apr  6 2014 Remi Collet <remi@fedoraproject.org> - 1.0.1-1
4036f1
- update to 1.0.1
4036f1
- get sources from github
4036f1
- run test suite when build --with tests
4036f1
4036f1
* Sun Oct 20 2013 Remi Collet <remi@fedoraproject.org> - 1.0.0-2
4036f1
- rename to lowercase
4036f1
4036f1
* Thu Sep 12 2013 Remi Collet <remi@fedoraproject.org> - 1.0.0-1
4036f1
- initial package