|
|
993c76f |
%global gh_commit 10246f167713d0bd0b74540ca81e4caf30b72157
|
|
|
993c76f |
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
|
|
|
993c76f |
%global gh_owner sebastianbergmann
|
|
|
993c76f |
%global gh_project phpdcd
|
|
|
993c76f |
%global php_home %{_datadir}/php/SebastianBergmann
|
|
|
993c76f |
%global pear_name phpdcd
|
|
|
993c76f |
%global pear_channel pear.phpunit.de
|
|
|
993c76f |
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
|
|
|
39bfadd |
|
|
|
39bfadd |
Name: php-phpunit-phpdcd
|
|
|
993c76f |
Version: 1.0.2
|
|
|
5874a3f |
Release: 11%{?dist}
|
|
|
39bfadd |
Summary: Dead Code Detector (DCD) for PHP code
|
|
|
39bfadd |
|
|
|
39bfadd |
License: BSD
|
|
|
993c76f |
URL: https://github.com/%{gh_owner}/%{gh_project}
|
|
|
993c76f |
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}.tar.gz
|
|
|
39bfadd |
|
|
|
993c76f |
# Autoload template
|
|
|
993c76f |
Source1: Autoload.php.in
|
|
|
993c76f |
|
|
|
993c76f |
# Fix for RPM, use autoload
|
|
|
993c76f |
Patch0: %{gh_project}-rpm.patch
|
|
|
39bfadd |
|
|
|
993c76f |
BuildArch: noarch
|
|
|
993c76f |
BuildRequires: php(language) >= 5.3.3
|
|
|
993c76f |
BuildRequires: %{_bindir}/phpab
|
|
|
993c76f |
%if %{with_tests}
|
|
|
993c76f |
BuildRequires: %{_bindir}/phpunit
|
|
|
993c76f |
BuildRequires: php-phpunit-FinderFacade >= 1.1.0
|
|
|
993c76f |
BuildRequires: php-phpunit-Version >= 1.0.3
|
|
|
993c76f |
BuildRequires: php-symfony-console >= 2.2.0
|
|
|
993c76f |
BuildRequires: php-phpunit-PHP-Timer >= 1.0.4
|
|
|
993c76f |
BuildRequires: php-phpunit-PHP-TokenStream >= 1.1.3
|
|
|
993c76f |
%endif
|
|
|
993c76f |
|
|
|
993c76f |
# From composer.json
|
|
|
993c76f |
Requires: php(language) >= 5.3.3
|
|
|
993c76f |
Requires: php-phpunit-FinderFacade >= 1.1.0
|
|
|
993c76f |
Requires: php-phpunit-Version >= 1.0.3
|
|
|
993c76f |
Requires: php-symfony-console >= 2.2.0
|
|
|
993c76f |
Requires: php-phpunit-PHP-Timer >= 1.0.4
|
|
|
993c76f |
Requires: php-phpunit-PHP-TokenStream >= 1.1.3
|
|
|
993c76f |
# From phpcompatinfo report for version 1.0.2
|
|
|
993c76f |
Requires: php-pcre
|
|
|
993c76f |
Requires: php-spl
|
|
|
993c76f |
|
|
|
993c76f |
Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version}
|
|
|
39bfadd |
|
|
|
39bfadd |
|
|
|
39bfadd |
%description
|
|
|
39bfadd |
phpdcd is a Dead Code Detector (DCD) for PHP code. It scans a PHP project
|
|
|
39bfadd |
for all declared functions and methods and reports those as being "dead
|
|
|
39bfadd |
code" that are not called at least once.
|
|
|
39bfadd |
|
|
|
993c76f |
|
|
|
39bfadd |
%prep
|
|
|
993c76f |
%setup -q -n %{gh_project}-%{gh_commit}
|
|
|
993c76f |
|
|
|
993c76f |
%patch0 -p1 -b .rpm
|
|
|
39bfadd |
|
|
|
39bfadd |
|
|
|
39bfadd |
%build
|
|
|
993c76f |
phpab \
|
|
|
993c76f |
--output src/Autoload.php \
|
|
|
993c76f |
--template %{SOURCE1} \
|
|
|
993c76f |
src
|
|
|
39bfadd |
|
|
|
39bfadd |
|
|
|
39bfadd |
%install
|
|
|
993c76f |
mkdir -p %{buildroot}%{php_home}
|
|
|
993c76f |
cp -pr src %{buildroot}%{php_home}/PHPDCD
|
|
|
39bfadd |
|
|
|
993c76f |
install -D -p -m 755 phpdcd %{buildroot}%{_bindir}/phpdcd
|
|
|
39bfadd |
|
|
|
39bfadd |
|
|
|
993c76f |
%if %{with_tests}
|
|
|
993c76f |
%check
|
|
|
993c76f |
phpunit \
|
|
|
993c76f |
--bootstrap src/Autoload.php \
|
|
|
993c76f |
-d date.timezone=UTC \
|
|
|
993c76f |
tests
|
|
|
993c76f |
%endif
|
|
|
39bfadd |
|
|
|
39bfadd |
|
|
|
39bfadd |
%post
|
|
|
993c76f |
if [ -x %{_bindir}/pear ]; then
|
|
|
993c76f |
%{_bindir}/pear uninstall --nodeps --ignore-errors --register-only \
|
|
|
993c76f |
%{pear_channel}/%{pear_name} >/dev/null || :
|
|
|
39bfadd |
fi
|
|
|
39bfadd |
|
|
|
39bfadd |
|
|
|
39bfadd |
%files
|
|
|
993c76f |
%doc LICENSE README.md composer.json
|
|
|
993c76f |
%{php_home}/PHPDCD
|
|
|
39bfadd |
%{_bindir}/phpdcd
|
|
|
39bfadd |
|
|
|
39bfadd |
|
|
|
39bfadd |
%changelog
|
|
|
5874a3f |
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-11
|
|
|
5874a3f |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
5874a3f |
|
|
|
00d5df3 |
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-10
|
|
|
00d5df3 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
00d5df3 |
|
|
|
faca9c7 |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-9
|
|
|
faca9c7 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
faca9c7 |
|
|
|
a37621c |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-8
|
|
|
a37621c |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
a37621c |
|
|
|
26af2cd |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-7
|
|
|
26af2cd |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
26af2cd |
|
|
|
2d20e22 |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-6
|
|
|
2d20e22 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
2d20e22 |
|
|
|
92e2a08 |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-5
|
|
|
92e2a08 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
92e2a08 |
|
|
|
be596c1 |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-4
|
|
|
be596c1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
be596c1 |
|
|
|
6b9df2f |
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-3
|
|
|
6b9df2f |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
6b9df2f |
|
|
|
47c88a1 |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-2
|
|
|
47c88a1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
47c88a1 |
|
|
|
993c76f |
* Sun May 4 2014 Remi Collet <remi@fedoraproject.org> - 1.0.2-1
|
|
|
993c76f |
- update to 1.0.2
|
|
|
993c76f |
- sources from github
|
|
|
993c76f |
- run test suite during build
|
|
|
993c76f |
- drop dependencies on php-phpunit-File_Iterator, php-ezc-ConsoleTools
|
|
|
993c76f |
- add dependencies on php-phpunit-FinderFacade, php-phpunit-Version
|
|
|
993c76f |
php-symfony-console
|
|
|
993c76f |
|
|
|
41f657c |
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3-5
|
|
|
41f657c |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
41f657c |
|
|
Christof Damian |
5b14360 |
* Sat Feb 23 2013 Christof Damian <christof@damian.net> - 0.9.3-4
|
|
Christof Damian |
5b14360 |
- use pear_metadir FTBFS 914375
|
|
Christof Damian |
5b14360 |
|
|
|
cdc862f |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3-3
|
|
|
cdc862f |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
cdc862f |
|
|
|
7f76c81 |
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3-2
|
|
|
7f76c81 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
7f76c81 |
|
|
Christof Damian |
3cedd8c |
* Sat Mar 24 2012 Christof Damian <christof@damian.net> - 0.9.3-1
|
|
Christof Damian |
3cedd8c |
- upstream 0.9.3
|
|
Christof Damian |
3cedd8c |
|
|
|
e75723a |
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.2-3
|
|
|
e75723a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
e75723a |
|
|
|
065fcb1 |
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.2-2
|
|
|
065fcb1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
065fcb1 |
|
|
|
39bfadd |
* Thu Feb 4 2010 Christof Damian <christof@damian.net> 0.9.2-1
|
|
|
39bfadd |
- initial packaging
|
|
|
39bfadd |
|