From 3e48f7848045a708ec61a5914019d028f57ca18c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 13 Jan 2021 16:26:45 +0100 Subject: update to 3.1.0 drop dependency on league/tactician drop dependency on laminas/laminas-diagnostics add dependency on doctrine/orm add dependency on symfony/config add dependency on symfony/dependency-injection add dependency on symfony/event-dispatcher add dependency on symfony/messenger add dependency on symfony/requirements-checker switch to phpunit9 --- php-bartlett-php-compatinfo-db.spec | 204 +++++++++++++++++++----------------- 1 file changed, 109 insertions(+), 95 deletions(-) (limited to 'php-bartlett-php-compatinfo-db.spec') diff --git a/php-bartlett-php-compatinfo-db.spec b/php-bartlett-php-compatinfo-db.spec index de8629f..b6b2107 100644 --- a/php-bartlett-php-compatinfo-db.spec +++ b/php-bartlett-php-compatinfo-db.spec @@ -7,12 +7,12 @@ # Please, preserve the changelog entries # # See https://github.com/llaville/php-compatinfo-db/releases -%global gh_commit 4bc78f3103014c65f598162055838a1abee939fe +%global gh_commit ad60cc8fad669063527c5754cc535ef509520aeb %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20151031 %global gh_owner llaville %global gh_project php-compatinfo-db -%global upstream_version 2.19.0 +%global upstream_version 3.1.0 #global upstream_prever RC1 # Namespace %global ns_vendor Bartlett @@ -41,91 +41,89 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit # Fix autoloader path # Fix sqlite database path # Fix version and avoir composer/package-versions-deprecated (relying on composer.lock) -Patch0: %{name}-2.19-rpm.patch +Patch0: %{name}-3-rpm.patch # CURL_SSLVERSION constants have been backported Patch1: %{name}-curltls.patch # upstream patches BuildArch: noarch -# Needed to build the database from sources -BuildRequires: php(language) >= 7.1 +BuildRequires: php(language) >= 7.2 +BuildRequires: php-json +BuildRequires: php-pcre +BuildRequires: php-pdo +BuildRequires: php-phar +BuildRequires: php-spl +# From composer.json, "require-dev" +# "composer/composer": "^2.0", +# "psr/log": "^1.0", +# "symfony/phpunit-bridge": "^5.1" # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(composer/semver) >= 3.0 with php-composer(composer/semver) < 4) -BuildRequires: (php-composer(symfony/console) >= 4.4 with php-composer(symfony/console) < 6) -BuildRequires: (php-composer(league/tactician) >= 1.0 with php-composer(league/tactician) < 2) -BuildRequires: (php-composer(laminas/laminas-diagnostics) >= 1.3 with php-composer(laminas/laminas-diagnostics) < 2) +BuildRequires: (php-composer(doctrine/orm) >= 2.7 with php-composer(doctrine/orm) < 4) +BuildRequires: (php-composer(symfony/requirements-checker) >= 2.0 with php-composer(symfony/requirements-checker) < 3) # remirepo:8 %else BuildRequires: php-composer-semver3 -BuildRequires: php-symfony-console4 >= 4.4 -BuildRequires: php-composer(league/tactician) < 2 -BuildRequires: php-composer(league/tactician) >= 1.0 -BuildRequires: php-composer(laminas/laminas-diagnostics) < 2 -BuildRequires: php-composer(laminas/laminas-diagnostics) >= 1.3 +BuildRequires: php-doctrine-orm >= 2.7 +BuildRequires: php-symfony-requirements-checker >= 2.0 %endif -BuildRequires: php-pdo -BuildRequires: php-reflection -BuildRequires: php-curl -BuildRequires: php-intl -BuildRequires: php-libxml -BuildRequires: php-openssl -BuildRequires: php-pcre -BuildRequires: php-spl -BuildRequires: php-json -BuildRequires: php-pdo_sqlite +BuildRequires: php-symfony4-config >= 4.4 +BuildRequires: php-symfony4-console >= 4.4 +BuildRequires: php-symfony4-dependency-injection >= 4.4 +BuildRequires: php-symfony4-event-dispatcher >= 4.4 +BuildRequires: php-symfony4-messenger >= 4.4 +BuildRequires: php-symfony4-stopwatch >= 4.4 # For our patch / autoloader BuildRequires: php-composer(fedora/autoloader) # From composer.json, "require-dev": { # "phpunit/php-timer": "^2.0" BuildRequires: php-cli %if %{with tests} -BuildRequires: php-composer(phpunit/phpunit) +BuildRequires: phpunit9 %endif # From composer.json, "require" -# "php": "^7.1", -# "composer/semver": "^1.0|^2.0|^3.0", -# "ext-curl": "*", -# "ext-intl": "*", -# "ext-libxml": "*", -# "ext-openssl": "*", +# "php": "^7.2|^8.0", +# "ext-json": "*", # "ext-pcre": "*", +# "ext-pdo": "*", +# "ext-phar": "*", # "ext-spl": "*", -# "ext-json": "*", -# "ext-pdo_sqlite": "*", -# "symfony/console": "^4.4||^5.0", # "composer/package-versions-deprecated": "^1.8", -# "league/tactician": "^1.0", -# "laminas/laminas-diagnostics": "^1.3" -Requires: php(language) >= 7.1 +# "composer/semver": "^1.0|^2.0|^3.0", +# "doctrine/orm": "^2.7", +# "symfony/config": "^4.4|^5.0", +# "symfony/console": "^4.4|^5.0", +# "symfony/dependency-injection": "^4.4|^5.0", +# "symfony/event-dispatcher": "^4.4|^5.0", +# "symfony/messenger": "^4.4|^5.0", +# "symfony/requirements-checker": "^2.0", +# "symfony/stopwatch": "^4.4|^5.0" +Requires: php(language) >= 7.2 +Requires: php-json +Requires: php-pcre +Requires: php-pdo +Requires: php-phar +Requires: php-spl # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(composer/semver) >= 3.0 with php-composer(composer/semver) < 4) -Requires: (php-composer(symfony/console) >= 4.4 with php-composer(symfony/console) < 6) -Requires: (php-composer(league/tactician) >= 1.0 with php-composer(league/tactician) < 2) -Requires: (php-composer(laminas/laminas-diagnostics) >= 1.3 with php-composer(laminas/laminas-diagnostics) < 2) +Requires: (php-composer(doctrine/orm) >= 2.7 with php-composer(doctrine/orm) < 4) +Requires: (php-composer(symfony/requirements-checker) >= 2.0 with php-composer(symfony/requirements-checker) < 3) # remirepo:8 %else -Requires: php-composer-semver3 -Requires: php-symfony-console4 >= 4.4 -Requires: php-composer(league/tactician) < 2 -Requires: php-composer(league/tactician) >= 1.0 -Requires: php-composer(laminas/laminas-diagnostics) < 2 -Requires: php-composer(laminas/laminas-diagnostics) >= 1.3 +Requires: php-composer-semver3 >= 3.0 +Requires: php-doctrine-orm >= 2.7 +Requires: php-symfony-requirements-checker >= 2.0 %endif -Requires: php-pdo -Requires: php-reflection -Requires: php-curl -Requires: php-date -Requires: php-intl -Requires: php-json -Requires: php-libxml -Requires: php-openssl -Requires: php-pcre -Requires: php-spl -Requires: php-pdo_sqlite +Requires: php-symfony4-config >= 4.4 +Requires: php-symfony4-console >= 4.4 +Requires: php-symfony4-dependency-injection >= 4.4 +Requires: php-symfony4-event-dispatcher >= 4.4 +Requires: php-symfony4-messenger >= 4.4 +Requires: php-symfony4-stopwatch >= 4.4 # Required by autoloader Requires: php-composer(fedora/autoloader) @@ -144,6 +142,11 @@ Conflicts: php-bartlett-PHP-CompatInfo < 5 %patch0 -p1 -b .rpm %patch1 -p0 -b .curltls +sed -e 's/Command::SUCCESS/0/' -i src/Presentation/Console/Command/*.php + +: relocate +mv config src/config + cat << 'EOF' | tee src/autoload.php compatinfo-db -: Diag -%{_bindir}/php -d date.timezone=Europe/Paris compatinfo-db bartlett:diagnose - -: Fix references database -%{_bindir}/php -d date.timezone=Europe/Paris compatinfo-db bartlett:db:release:php +export DATABASE_URL=sqlite:///${PWD}/compatinfo.sqlite +doctrine orm:schema-tool:create : Generate the references database -%{_bindir}/php -d date.timezone=Europe/Paris compatinfo-db bartlett:db:init +%{_bindir}/php -d memory_limit=1G -d date.timezone=Europe/Paris compatinfo-db db:init + +: Diag +%{_bindir}/php -d date.timezone=Europe/Paris compatinfo-db diagnose + %install mkdir -p %{buildroot}%{_datadir}/php/%{ns_vendor} cp -pr src %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project} -install -D -p -m 644 data/compatinfo.sqlite %{buildroot}%{_datadir}/%{name}/compatinfo.sqlite -install -D -p -m 755 bin/compatinfo-db %{buildroot}%{_bindir}/%{name} +install -D -p -m 644 compatinfo.sqlite %{buildroot}%{_datadir}/%{name}/compatinfo.sqlite +install -D -p -m 755 bin/compatinfo-db %{buildroot}%{_bindir}/%{name} %if %{with tests} %check -export BARTLETT_COMPATINFO_DB=%{buildroot}%{_datadir}/%{name}/compatinfo.sqlite +export DATABASE_URL=sqlite:///%{buildroot}%{_datadir}/%{name}/compatinfo.sqlite cat << 'EOF' | tee tests/bootstrap.php - 3.1.0-1 +- update to 3.1.0 +- drop dependency on league/tactician +- drop dependency on laminas/laminas-diagnostics +- add dependency on doctrine/orm +- add dependency on symfony/config +- add dependency on symfony/dependency-injection +- add dependency on symfony/event-dispatcher +- add dependency on symfony/messenger +- add dependency on symfony/requirements-checker +- switch to phpunit9 + +* Thu Jan 7 2021 Remi Collet - 3.0.2-1 +- update to 3.0.2 + * Mon Oct 5 2020 Remi Collet - 2.19.0-1 - update to 2.19.0 -- cgit