summaryrefslogtreecommitdiffstats
path: root/php-doctrine-dbal3.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-11-16 13:55:19 +0100
committerRemi Collet <remi@remirepo.net>2020-11-16 13:55:19 +0100
commit9406c186ea685ef1165605f35181aab38c09a957 (patch)
tree0e58ada8f2a54345712bdd82c9c66f24e2a49fb0 /php-doctrine-dbal3.spec
parent7ecbe5302ce0e47b8a0ef8b7ddceb7c96fe048b2 (diff)
update to 3.0.0
rename to php-doctrine-dbal3 move to /usr/share/php/Doctrine/DBAL3
Diffstat (limited to 'php-doctrine-dbal3.spec')
-rw-r--r--php-doctrine-dbal3.spec93
1 files changed, 49 insertions, 44 deletions
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
<?php
/**
* Autoloader for %{name} and its' dependencies
@@ -167,33 +164,36 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Dependencies::optional([
[
- (getenv('RPM_SYMFONY_TREE')?:'%{phpdir}/Symfony4') . '/Component/Console/autoload.php',
+ (getenv('RPM_SYMFONY_TREE')?:'%{phpdir}/Symfony5') . '/Component/Console/autoload.php',
+ '%{phpdir}/Symfony4/Component/Console/autoload.php',
'%{phpdir}/Symfony3/Component/Console/autoload.php',
- '%{phpdir}/Symfony/Component/Console/autoload.php',
],
]);
AUTOLOAD
%install
-mkdir -p %{buildroot}/%{phpdir}
-cp -rp lib/Doctrine %{buildroot}/%{phpdir}/
+mkdir -p %{buildroot}/%{phpdir}/Doctrine
+cp -rp src %{buildroot}/%{phpdir}/Doctrine/DBAL%{major}
mkdir -p %{buildroot}/%{_bindir}
-install -pm 0755 bin/doctrine-dbal.php %{buildroot}/%{_bindir}/doctrine-dbal
+install -pm 0755 bin/doctrine-dbal.php %{buildroot}/%{_bindir}/doctrine-dbal%{major}
%check
%if %{with tests}
cat > bs.php <<'BOOTSTRAP'
<?php
-require_once '%{buildroot}/%{phpdir}/Doctrine/DBAL/autoload.php';
+require_once '%{buildroot}/%{phpdir}/Doctrine/DBAL%{major}/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4(
- 'Doctrine\\Tests\\',
- __DIR__ . '/tests/Doctrine/Tests'
+ 'Doctrine\\DBAL\\Tests\\',
+ __DIR__ . '/tests'
);
BOOTSTRAP
+: ignore test using PHPStan
+find tests -name \*php -exec grep -q PHPStan {} \; -print -delete
+
: Upstream tests
RETURN_CODE=0
for PHP_EXEC in php php73 php74 php80; do
@@ -215,11 +215,16 @@ exit $RETURN_CODE
%license LICENSE
%doc *.md
%doc composer.json
-%{phpdir}/Doctrine/DBAL
-%{_bindir}/doctrine-dbal
+%{phpdir}/Doctrine/DBAL%{major}
+%{_bindir}/doctrine-dbal%{major}
%changelog
+* Mon Nov 16 2020 Remi Collet <remi@remirepo.net> - 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 <remi@remirepo.net> - 2.12.1-1
- update to 2.12.1