From 935a42e4aaf1fa8fc81057bd9223bfac7b662292 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 1 Jun 2018 15:33:23 +0200 Subject: allow parallel installation of 1.0 and 1.1 --- php-doctrine-instantiator.spec | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/php-doctrine-instantiator.spec b/php-doctrine-instantiator.spec index b6fdf3f..068b458 100644 --- a/php-doctrine-instantiator.spec +++ b/php-doctrine-instantiator.spec @@ -19,15 +19,23 @@ %global with_tests 0%{!?_without_tests:1} %endif +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Name: php-doctrine-instantiator -Version: 1.1.0 +Release: 3%{?dist} +%global major %nil +%else +Name: php-doctrine-instantiator11 Release: 1%{?dist} +%global major 11 +%global with_tests 0 +%endif +Version: 1.1.0 Summary: Instantiate objects in PHP without invoking their constructors Group: Development/Libraries License: MIT URL: https://github.com/%{gh_owner}/%{gh_project} -Source0: %{name}-%{version}-%{gh_short}.tgz +Source0: php-%{gh_owner}-%{gh_project}-%{version}-%{gh_short}.tgz Source1: makesrc.sh BuildArch: noarch @@ -50,7 +58,12 @@ Requires: php-spl # Autoloader Requires: php-composer(fedora/autoloader) +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Obsoletes: php-doctrine-instantiator11 <= %{version}-%{release} Provides: php-composer(doctrine/instantiator) = %{version} +%else +Requires: php-doctrine-instantiator +%endif %description @@ -71,8 +84,8 @@ instantiating PHP classes. %install -mkdir -p %{buildroot}%{_datadir}/php -cp -pr src/* %{buildroot}%{_datadir}/php +mkdir -p %{buildroot}%{_datadir}/php/Doctrine +cp -pr src/Doctrine/Instantiator %{buildroot}%{_datadir}/php/Doctrine/Instantiator%{major} %check @@ -107,10 +120,13 @@ exit $ret %license LICENSE %doc *.md composer.json %dir %{_datadir}/php/Doctrine - %{_datadir}/php/Doctrine/Instantiator + %{_datadir}/php/Doctrine/Instantiator%{major} %changelog +* Fri Aug 4 2017 Remi Collet - 1.1.0-3 +- allow parallel installation of 1.0 and 1.1 + * Fri Aug 4 2017 Remi Collet - 1.1.0-1 - Update to 1.1.0 - raise dependency on PHP 7.1 -- cgit