From e21e82ba33fddf9bbdcb6007e6a5b734efef98d7 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 21 Nov 2019 12:51:54 +0100 Subject: duplicate v1 stuff --- php-doctrine-doctrine-bundle2.spec | 360 +++++++++++++++++++++++++++++++++++++ 1 file changed, 360 insertions(+) create mode 100644 php-doctrine-doctrine-bundle2.spec (limited to 'php-doctrine-doctrine-bundle2.spec') diff --git a/php-doctrine-doctrine-bundle2.spec b/php-doctrine-doctrine-bundle2.spec new file mode 100644 index 0000000..63f21aa --- /dev/null +++ b/php-doctrine-doctrine-bundle2.spec @@ -0,0 +1,360 @@ +# remirepo spec file for php-doctrine-doctrine-bundle, from: +# +# Fedora spec file for php-doctrine-doctrine-bundle +# +# Copyright (c) 2015-2019 Shawn Iwinski +# +# License: MIT +# http://opensource.org/licenses/MIT +# +# Please preserve changelog entries +# + +%global github_owner doctrine +%global github_name DoctrineBundle +%global github_version 1.12.0 +%global github_commit a374f3bc54fe7c23ddb722ef6b9ddd2d9dcb9115 + +%global composer_vendor doctrine +%global composer_project doctrine-bundle + +# "php": "^7.1" +%global php_min_ver 7.1 +# "doctrine/dbal": "^2.5.12" +%global dbal_min_ver 2.5.12 +%global dbal_max_ver 3.0 +# "doctrine/doctrine-cache-bundle": "~1.2" +%global cache_bundle_min_ver 1.2 +%global cache_bundle_max_ver 2.0 +# "doctrine/orm": "~2.6" +%global orm_min_ver 2.6 +%global orm_max_ver 3.0 +# "jdorn/sql-formatter": "^1.2.16" +%global sql_formatter_min_ver 1.2.16 +%global sql_formatter_max_ver 2.0 +# "symfony/config": "^3.4.30|^4.3.3", +# "symfony/console": "^3.4.30|^4.3.3" +# "symfony/dependency-injection": "^3.4.30|^4.3.3" +# "symfony/doctrine-bridge": "^3.4.30|^4.3.3" +# "symfony/framework-bundle": "^3.4.30|^4.3.3" +# "symfony/cache": "^3.4.30|^4.3.3", +# "symfony/property-info": "^3.4.30|^4.3.3" +# "symfony/twig-bridge": "^3.4|^4.1", +# "symfony/validator": "^3.4.30|^4.3.3" +# "symfony/web-profiler-bundle": "^3.4.30|^4.3.3" +# "symfony/yaml": "^3.4.30|^4.3.3" +%global symfony_min_ver 3.4 +%global symfony_max_ver 5 +%global symfony_br_ver 4.3.3 +# "twig/twig": "~1.34|~2.12" +%global twig_min_ver 1.34 +%if 0%{?fedora} >= 26 || 0%{?rhel} >= 8 +%global twig_max_ver 3 +%else +%global twig_max_ver 2 +%endif + +# Build using "--without tests" to disable tests +%global with_tests 0%{!?_without_tests:1} + +%{!?phpdir: %global phpdir %{_datadir}/php} + +Name: php-%{composer_vendor}-%{composer_project} +Version: %{github_version} +Release: 1%{?dist} +Summary: Symfony Bundle for Doctrine + +License: MIT +URL: https://github.com/%{github_owner}/%{github_name} +Source0: %{name}-%{github_version}-%{github_commit}.tar.gz +Source1: %{name}-get-source.sh + +Patch0: %{name}-vendor.patch + +BuildArch: noarch +# Tests +%if %{with_tests} +## composer.json +BuildRequires: php(language) >= %{php_min_ver} +BuildRequires: php-theseer-autoload +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires:(php-composer(doctrine/dbal) >= %{dbal_min_ver} with php-composer(doctrine/dbal) < %{dbal_max_ver}) +BuildRequires:(php-composer(doctrine/doctrine-cache-bundle) >= %{cache_bundle_min_ver} with php-composer(doctrine/doctrine-cache-bundle) < %{cache_bundle_max_ver}) +BuildRequires:(php-composer(doctrine/orm) >= %{orm_min_ver} with php-composer(doctrine/orm) < %{orm_max_ver}) +BuildRequires:(php-composer(jdorn/sql-formatter) >= %{sql_formatter_min_ver} with php-composer(jdorn/sql-formatter) < %{sql_formatter_max_ver}) +BuildRequires:(php-composer(twig/twig) >= %{twig_min_ver} with php-composer(twig/twig) < %{twig_max_ver}) +# remirepo:12 +%else +BuildRequires: php-composer(doctrine/dbal) < %{dbal_max_ver} +BuildRequires: php-composer(doctrine/dbal) >= %{dbal_min_ver} +BuildRequires: php-composer(doctrine/doctrine-cache-bundle) < %{cache_bundle_max_ver} +BuildRequires: php-composer(doctrine/doctrine-cache-bundle) >= %{cache_bundle_min_ver} +BuildRequires: php-composer(doctrine/orm) < %{orm_max_ver} +BuildRequires: php-composer(doctrine/orm) >= %{orm_min_ver} +BuildRequires: php-composer(jdorn/sql-formatter) < %{sql_formatter_max_ver} +BuildRequires: php-composer(jdorn/sql-formatter) >= %{sql_formatter_min_ver} +BuildRequires: php-composer(twig/twig) < %{twig_max_ver} +BuildRequires: php-composer(twig/twig) >= %{twig_min_ver} +%endif +# ensure same version of all components is used +# "require" +BuildRequires: php-symfony4-config >= %{symfony_br_ver} +BuildRequires: php-symfony4-console >= %{symfony_br_ver} +BuildRequires: php-symfony4-dependency-injection >= %{symfony_br_ver} +BuildRequires: php-symfony4-doctrine-bridge >= %{symfony_br_ver} +BuildRequires: php-symfony4-framework-bundle >= %{symfony_br_ver} +# "require-dev" +BuildRequires: php-symfony4-cache >= %{symfony_br_ver} +BuildRequires: php-symfony4-property-info >= %{symfony_br_ver} +BuildRequires: php-symfony4-twig-bridge >= %{symfony_br_ver} +BuildRequires: php-symfony4-validator >= %{symfony_br_ver} +BuildRequires: php-symfony4-web-profiler-bundle >= %{symfony_br_ver} +BuildRequires: php-symfony4-yaml >= %{symfony_br_ver} +BuildRequires: phpunit7 >= 7.5 +## phpcompatinfo (computed from version 1.11.0) +BuildRequires: php-dom +BuildRequires: php-pcre +BuildRequires: php-reflection +BuildRequires: php-spl +## Autoloader +BuildRequires: php-composer(fedora/autoloader) +%endif + +# composer.json +Requires: php(language) >= %{php_min_ver} +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(doctrine/dbal) >= %{dbal_min_ver} with php-composer(doctrine/dbal) < %{dbal_max_ver}) +Requires: (php-composer(doctrine/doctrine-cache-bundle) >= %{cache_bundle_min_ver} with php-composer(doctrine/doctrine-cache-bundle) < %{cache_bundle_max_ver}) +Requires: (php-composer(jdorn/sql-formatter) >= %{sql_formatter_min_ver} with php-composer(jdorn/sql-formatter) < %{sql_formatter_max_ver}) +Requires: (php-composer(symfony/config) >= %{symfony_min_ver} with php-composer(symfony/config) < %{symfony_max_ver}) +Requires: (php-composer(symfony/console) >= %{symfony_min_ver} with php-composer(symfony/console) < %{symfony_max_ver}) +Requires: (php-composer(symfony/dependency-injection) >= %{symfony_min_ver} with php-composer(symfony/dependency-injection) < %{symfony_max_ver}) +Requires: (php-composer(symfony/doctrine-bridge) >= %{symfony_min_ver} with php-composer(symfony/doctrine-bridge) < %{symfony_max_ver}) +Requires: (php-composer(symfony/framework-bundle) >= %{symfony_min_ver} with php-composer(symfony/framework-bundle) < %{symfony_max_ver}) +# remirepo:18 +%else +Requires: php-composer(doctrine/dbal) >= %{dbal_min_ver} +Requires: php-composer(doctrine/dbal) < %{dbal_max_ver} +Requires: php-composer(doctrine/doctrine-cache-bundle) >= %{cache_bundle_min_ver} +Requires: php-composer(doctrine/doctrine-cache-bundle) < %{cache_bundle_max_ver} +Requires: php-composer(jdorn/sql-formatter) >= %{sql_formatter_min_ver} +Requires: php-composer(jdorn/sql-formatter) < %{sql_formatter_max_ver} +Requires: php-composer(symfony/config) >= %{symfony_min_ver} +Requires: php-composer(symfony/config) < %{symfony_max_ver} +Requires: php-composer(symfony/console) >= %{symfony_min_ver} +Requires: php-composer(symfony/console) < %{symfony_max_ver} +Requires: php-composer(symfony/dependency-injection) >= %{symfony_min_ver} +Requires: php-composer(symfony/dependency-injection) < %{symfony_max_ver} +Requires: php-composer(symfony/doctrine-bridge) >= %{symfony_min_ver} +Requires: php-composer(symfony/doctrine-bridge) < %{symfony_max_ver} +Requires: php-composer(symfony/framework-bundle) >= %{symfony_min_ver} +Requires: php-composer(symfony/framework-bundle) < %{symfony_max_ver} +%endif +# phpcompatinfo (computed from version 1.11.0) +Requires: php-pcre +Requires: php-reflection +Requires: php-spl +# Autoloader +Requires: php-composer(fedora/autoloader) + +# Composer +Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} + +# Weak dependencies +# remirepo:1 +%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8 +Suggests: php-composer(doctrine/orm) +Suggests: php-composer(symfony/web-profiler-bundle) +Suggests: php-composer(twig/twig) +# remirepo:1 +%endif + +%description +Doctrine DBAL & ORM Bundle for the Symfony Framework. + +Autoloader: %{phpdir}/Doctrine/Bundle/DoctrineBundle/autoload.php + + +%prep +%setup -qn %{github_name}-%{github_commit} +%patch0 -p1 -b .rpm + +find . -name \*.rpm -delete -print + +: Licenses and docs +mkdir -p .rpm/{docs,licenses} +mv *.md composer.* .rpm/docs +mkdir -p .rpm/docs/Resources +mv Resources/doc .rpm/docs/Resources/ +mv LICENSE .rpm/licenses + + +%build +: Create autoloader +cat <<'AUTOLOAD' | tee autoload.php +phpunit.xml + +: Upstream tests with SCLs if available +RETURN_CODE=0 +for SCL in php php71 php72 php73 php74; do + if which $SCL; then + $SCL %{_bindir}/phpunit7 \ + --filter '^((?!(testBacktraceLogged)).)*$' \ + --bootstrap bs.php \ + --verbose || RETURN_CODE=1 + fi +done +exit $RETURN_CODE +%else +: Tests skipped +%endif + + +%files +# remirepo:1 +%{!?_licensedir:%global license %%doc} +%license .rpm/licenses/* +%doc .rpm/docs/* +%{phpdir}/Doctrine/Bundle/DoctrineBundle +%exclude %{phpdir}/Doctrine/Bundle/DoctrineBundle/phpunit.* +%exclude %{phpdir}/Doctrine/Bundle/DoctrineBundle/Tests + + +%changelog +* Wed Nov 20 2019 Remi Collet - 1.12.0-1 +- update to 1.12.0 +- add dependency on symfony/config +- raise build dependency on Symfony 4.3.3 + +* Tue Jun 4 2019 Remi Collet - 1.11.2-1 +- update to 1.11.2 + +* Tue May 14 2019 Remi Collet - 1.11.1-1 +- update to 1.11.1 + +* Mon May 13 2019 Remi Collet - 1.11.0-1 +- update to 1.11.0 +- raise dependency on PHP 7.1 +- raise dependency on symfony 3.4 +- use phpunit7 + +* Fri Feb 8 2019 Remi Collet - 1.10.2-1 +- update to 1.10.2 + +* Tue Jan 8 2019 Remi Collet - 1.10.1-1 +- update to 1.10.1 +- prefer symfony 4 + +* Wed Oct 17 2018 Remi Collet - 1.9.1-1 +- update to 1.9.1 +- raise dependency on doctrine/dbal 2.5.12 +- raise dependency on jdorn/sql-formatter 1.2.16 + +* Fri Nov 10 2017 Remi Collet - 1.6.13-1 +- Update to 1.6.13 +- fix autoloader to allow symfony 2, 3 and 4 +- ensure we use same version of all component at build time +- raise dependency on doctrine/doctrine-cache-bundle 1.2 +- raise dependency on twig/twig 1.12 + +* Sat Mar 04 2017 Shawn Iwinski - 1.6.7-1 +- Updated to 1.6.7 (RHBZ #1416390) +- Removed optional dependencies' conflicts +- Changed autoloader to use short array format + +* Sun Jan 8 2017 Remi Collet - 1.6.6-1 +- update to 1.6.6 +- allow twig 2 +- don't allow symfony 3 (autoloader not ready) +- raise dependency on PHP 5.5.9 + +* Fri Jan 6 2017 Remi Collet - 1.6.4-2 +- drop conflict with twig 2 +- ensure twig 1 is used during the build + +* Fri Dec 30 2016 Shawn Iwinski - 1.6.4-1 +- Updated to 1.6.4 (RHBZ #1279827) +- Use php-composer(fedora/autoloader) +- Run upstream tests with SCLs if they are available +- Set Resources/doc as %%doc + +* Sat Sep 05 2015 Shawn Iwinski - 1.5.2-1 +- Updated to 1.5.2 (RHBZ #1253092 / CVE-2015-5723) +- Updated autoloader to load dependencies after self registration + +* Sat Jun 27 2015 Remi Collet - 1.5.0-3 +- backport for remi repo + +* Fri Jun 26 2015 Shawn Iwinski - 1.5.0-3 +- Autoloader updates + +* Tue Jun 16 2015 Shawn Iwinski - 1.5.0-2 +- Fixed dependencies +- Added optional dependency version conflicts + +* Thu Jun 11 2015 Shawn Iwinski - 1.5.0-1 +- Initial package -- cgit