From 6c3b6ecb6651804e6d1daedd83f423eb15444ed2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 1 Nov 2017 15:19:53 +0100 Subject: fix FTBFS from Koschei, add patch for PHP 7.2 from https://github.com/pdepend/pdepend/pull/303 provide pdepend allow only a symfony version --- php-pdepend-PHP-Depend-autoload.php | 20 ------------- php-pdepend-PHP-Depend.spec | 59 ++++++++++++++++++++++++++----------- 2 files changed, 42 insertions(+), 37 deletions(-) delete mode 100644 php-pdepend-PHP-Depend-autoload.php diff --git a/php-pdepend-PHP-Depend-autoload.php b/php-pdepend-PHP-Depend-autoload.php deleted file mode 100644 index 947304d..0000000 --- a/php-pdepend-PHP-Depend-autoload.php +++ /dev/null @@ -1,20 +0,0 @@ -= 27 || "%{?vendor}" == "Remi Collet" +%global sym_min 3 +%global sym_max 4 +%global sym_path %{_datadir}/php/Symfony3 +%else +%global sym_min 2.3 +%global sym_max 3 +%global sym_path %{_datadir}/php/Symfony +%endif + Name: php-pdepend-PHP-Depend Version: 2.5.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: PHP_Depend design quality metrics for PHP package Group: Development/Libraries @@ -28,8 +38,8 @@ URL: http://pdepend.org/ # git snashop to get upstream test suite Source0: %{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh + # Autoloader -Source2: %{name}-autoload.php Patch0: %{name}-rpm.patch # https://github.com/pdepend/pdepend/pull/303 @@ -43,12 +53,12 @@ BuildArch: noarch # Test suite pass with PHPUnit 4.8.12 and PHPUnit 5.0.5 BuildRequires: php-composer(phpunit/phpunit) >= 4.0.0 BuildRequires: php(language) >= 5.3.7 -BuildRequires: php-composer(symfony/dependency-injection) < 4 -BuildRequires: php-composer(symfony/dependency-injection) >= 2.3.0 -BuildRequires: php-composer(symfony/filesystem) < 4 -BuildRequires: php-composer(symfony/filesystem) >= 2.3.0 -BuildRequires: php-composer(symfony/config) < 4 -BuildRequires: php-composer(symfony/config) >= 2.3.0 +BuildRequires: php-composer(symfony/dependency-injection) < %{sym_max} +BuildRequires: php-composer(symfony/dependency-injection) >= %{sym_min} +BuildRequires: php-composer(symfony/filesystem) < %{sym_max} +BuildRequires: php-composer(symfony/filesystem) >= %{sym_min} +BuildRequires: php-composer(symfony/config) < %{sym_max} +BuildRequires: php-composer(symfony/config) >= %{sym_min} BuildRequires: php-bcmath BuildRequires: php-date BuildRequires: php-dom @@ -71,12 +81,12 @@ BuildRequires: php-composer(fedora/autoloader) # "symfony/filesystem": "^2.3.0|^3", # "symfony/config": "^2.3.0|^3" Requires: php(language) >= 5.3.7 -Requires: php-composer(symfony/dependency-injection) >= 2.3.0 -Requires: php-composer(symfony/dependency-injection) < 4 -Requires: php-composer(symfony/filesystem) >= 2.3.0 -Requires: php-composer(symfony/filesystem) < 4 -Requires: php-composer(symfony/config) >= 2.3.0 -Requires: php-composer(symfony/config) < 4 +Requires: php-composer(symfony/dependency-injection) >= %{sym_min} +Requires: php-composer(symfony/dependency-injection) < %{sym_max} +Requires: php-composer(symfony/filesystem) >= %{sym_min} +Requires: php-composer(symfony/filesystem) < %{sym_max} +Requires: php-composer(symfony/config) >= %{sym_min} +Requires: php-composer(symfony/config) < %{sym_max} # From phpcompatinfo report for version 2.3.0 Requires: php-bcmath Requires: php-date @@ -98,6 +108,7 @@ Obsoletes: php-channel-pdepend <= 1.3 Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version} Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +Provides: pdepend = %{version} %description @@ -111,7 +122,18 @@ reusability and maintainability. %patch0 -p0 %patch1 -p1 -cp %{SOURCE2} src/main/php/PDepend/autoload.php +cat << 'EOF' | tee src/main/php/PDepend/autoload.php + - 2.5.0-4 -- open https://github.com/pdepend/pdepend/pull/303 - fix for 7.2 +* Wed Nov 1 2017 Remi Collet - 2.5.0-5 +- fix FTBFS from Koschei, add patch for PHP 7.2 from + https://github.com/pdepend/pdepend/pull/303 +- provide pdepend +- allow only a symfony version * Wed May 10 2017 Remi Collet - 2.5.0-3 - adapt for Symfony v3 -- cgit