From 9406c186ea685ef1165605f35181aab38c09a957 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 16 Nov 2020 13:55:19 +0100 Subject: update to 3.0.0 rename to php-doctrine-dbal3 move to /usr/share/php/Doctrine/DBAL3 --- php-doctrine-dbal3.spec | 93 ++++++++++++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 44 deletions(-) (limited to 'php-doctrine-dbal3.spec') diff --git a/php-doctrine-dbal3.spec b/php-doctrine-dbal3.spec index 5d93176..86cd072 100644 --- a/php-doctrine-dbal3.spec +++ b/php-doctrine-dbal3.spec @@ -13,8 +13,9 @@ %global github_owner doctrine %global github_name dbal -%global github_version 2.12.1 -%global github_commit adce7a954a1c2f14f85e94aed90c8489af204086 +%global github_version 3.0.0 +%global github_commit ee6d1260d5cc20ec506455a585945d7bdb98662c +%global major 3 %global composer_vendor doctrine %global composer_project dbal @@ -28,15 +29,16 @@ %global doctrine_event_min_ver 1.0 %global doctrine_event_max_ver 2 # "symfony/console": "^2.0.5|^3.0|^4.0|^5.0" -%global symfony_console_min_ver 2.0.5 -%global symfony_console_max_ver 5 +# ignore v2 +%global symfony_console_min_ver 3.0 +%global symfony_console_max_ver 6 %{!?phpdir: %global phpdir %{_datadir}/php} # Build using "--without tests" to disable tests %bcond_without tests -Name: php-%{composer_vendor}-%{composer_project} +Name: php-%{composer_vendor}-%{composer_project}%{major} Version: %{github_version} Release: 1%{?github_release}%{?dist} Summary: Doctrine Database Abstraction Layer (DBAL) @@ -67,20 +69,21 @@ BuildRequires:(php-composer(doctrine/event-manager) >= %{doctrine_event_min_ver} BuildRequires:(php-composer(symfony/console) >= %{symfony_console_min_ver} with php-composer(symfony/console) < %{symfony_console_max_ver}) # remirepo:9 %else -BuildRequires: php-composer(doctrine/cache) >= %{doctrine_cache_min_ver} -BuildRequires: php-composer(doctrine/cache) < %{doctrine_cache_max_ver} -BuildRequires: php-composer(doctrine/event-manager) >= %{doctrine_event_min_ver} -BuildRequires: php-composer(doctrine/event-manager) < %{doctrine_event_max_ver} +BuildRequires: php-doctrine-cache >= %{doctrine_cache_min_ver} +BuildRequires: php-doctrine-cache < %{doctrine_cache_max_ver} +BuildRequires: php-doctrine-event-manager >= %{doctrine_event_min_ver} +BuildRequires: php-doctrine-event-manager < %{doctrine_event_max_ver} ## composer.json (optional) -BuildRequires: php-composer(symfony/console) >= %{symfony_console_min_ver} -BuildRequires: php-composer(symfony/console) < %{symfony_console_max_ver} +BuildRequires: php-symfony4-console >= %{symfony_console_min_ver} +BuildRequires: php-symfony4-console < %{symfony_console_max_ver} %endif -## phpcompatinfo (computed from version 2.12) +## phpcompatinfo (computed from version 3.0) BuildRequires: php-date -BuildRequires: php-json BuildRequires: php-hash +BuildRequires: php-json BuildRequires: php-pcre BuildRequires: php-pdo +BuildRequires: php-posix BuildRequires: php-reflection BuildRequires: php-spl ## Autoloader @@ -97,32 +100,27 @@ Requires: (php-composer(doctrine/event-manager) >= %{doctrine_event_min_ver} Requires: (php-composer(symfony/console) >= %{symfony_console_min_ver} with php-composer(symfony/console) < %{symfony_console_max_ver}) # remirepo:9 %else -Requires: php-composer(doctrine/cache) >= %{doctrine_cache_min_ver} -Requires: php-composer(doctrine/cache) < %{doctrine_cache_max_ver} -Requires: php-composer(doctrine/event-manager) >= %{doctrine_event_min_ver} -Requires: php-composer(doctrine/event-manager) < %{doctrine_event_max_ver} +Requires: php-doctrine-cache >= %{doctrine_cache_min_ver} +Requires: php-doctrine-cache < %{doctrine_cache_max_ver} +Requires: php-doctrine-event-manager >= %{doctrine_event_min_ver} +Requires: php-doctrine-event-manager < %{doctrine_event_max_ver} # composer.json (optional) -Requires: php-composer(symfony/console) >= %{symfony_console_min_ver} -Requires: php-composer(symfony/console) < %{symfony_console_max_ver} +Requires: php-symfony4-console >= %{symfony_console_min_ver} +Requires: php-symfony4-console < %{symfony_console_max_ver} %endif -Requires: php-pdo -# phpcompatinfo (computed from version 2.12) +# phpcompatinfo (computed from version 3.0) Requires: php-date -Requires: php-json Requires: php-hash +Requires: php-json Requires: php-pcre -Requires: php-reflection +Requires: php-pdo Requires: php-spl # Autoloader Requires: php-composer(fedora/autoloader) # Composer Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} -# PEAR -Provides: php-pear(pear.doctrine-project.org/DoctrineDBAL) = %{version} -# Rename -Obsoletes: php-doctrine-DoctrineDBAL < %{version} -Provides: php-doctrine-DoctrineDBAL = %{version} + %description The Doctrine database abstraction & access layer (DBAL) offers a lightweight @@ -135,22 +133,21 @@ to implement custom drivers that may use existing native or self-made APIs. For example, the DBAL ships with a driver for Oracle databases that uses the oci8 extension under the hood. -Autoloader: %{phpdir}/Doctrine/DBAL/autoload.php +Autoloader: %{phpdir}/Doctrine/DBAL%{major}/autoload.php %prep %setup -qn %{github_name}-%{github_commit} -: Patch bin script +: Patch bin script and drop composer/package-versions-deprecated usage %patch0 -p1 -b .rpm - -: Remove empty file -rm -f lib/Doctrine/DBAL/README.markdown +sed -e 's/@VERSION@/%{github_version}/' -i src/Tools/Console/ConsoleRunner.php +find . -name \*.rpm -delete %build : Create autoloader -cat <<'AUTOLOAD' | tee lib/Doctrine/DBAL/autoload.php +cat <<'AUTOLOAD' | tee src/autoload.php bs.php <<'BOOTSTRAP' - 3.0.0-1 +- update to 3.0.0 +- rename to php-doctrine-dbal3 +- move to /usr/share/php/Doctrine/DBAL3 + * Mon Nov 16 2020 Remi Collet - 2.12.1-1 - update to 2.12.1 -- cgit