diff options
Diffstat (limited to 'php-doctrine-lexer2.spec')
-rw-r--r-- | php-doctrine-lexer2.spec | 54 |
1 files changed, 42 insertions, 12 deletions
diff --git a/php-doctrine-lexer2.spec b/php-doctrine-lexer2.spec index 282bf17..785c83b 100644 --- a/php-doctrine-lexer2.spec +++ b/php-doctrine-lexer2.spec @@ -12,9 +12,10 @@ # Github %global github_owner doctrine %global github_name lexer -%global github_version 1.2.3 -%global github_commit c268e882d4dbdd85e36e4ad69e02dc284f89d229 +%global github_version 2.0.0 +%global github_commit 3cf140b81e55d5d640f73367d829db7e3023ef69 %global github_short %(c=%{github_commit}; echo ${c:0:7}) +%global major 2 # Namespace %global ns_vendor Doctrine %global ns_project Common @@ -29,7 +30,7 @@ %{!?phpdir: %global phpdir %{_datadir}/php} %global with_tests 0%{!?_without_tests:1} -Name: php-%{composer_vendor}-%{composer_project} +Name: php-%{composer_vendor}-%{composer_project}%{major} Version: %{github_version} Release: 1%{?github_release}%{?dist} Summary: Base library for a lexer that can be used in top-down, recursive descent parsers @@ -43,7 +44,14 @@ Source1: makesrc.sh BuildArch: noarch BuildRequires: php-fedora-autoloader-devel %if %{with_tests} +# remirepo:1 BuildRequires: php(language) >= %{php_min_ver} +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires:(php-composer(doctrine/deprecations) >= 1.0 with php-composer(doctrine/deprecations) < 2) +# remirepo:2 +%else +BuildRequires: php-doctrine-deprecations >= 1.0 +%endif BuildRequires: php-pcre BuildRequires: php-reflection BuildRequires: phpunit9 @@ -51,6 +59,13 @@ BuildRequires: phpunit9 # composer.json Requires: php(language) >= %{php_min_ver} +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(doctrine/deprecations) >= 1.0 with php-composer(doctrine/deprecations) < 2) +# remirepo:2 +%else +Requires: php-doctrine-deprecations >= 1.0 +%endif # phpcompatinfo (computed from version 1.1.0) Requires: php-pcre Requires: php-reflection @@ -66,6 +81,8 @@ parsers. This lexer is used in Doctrine Annotations and in Doctrine ORM (DQL). +This package provides %{composer_vendor}/%{composer_project} version %{major}. + Autoloader: %{phpdir}/%{ns_vendor}/%{ns_project}/%{ns_subproj}/autoload.php @@ -76,14 +93,22 @@ Autoloader: %{phpdir}/%{ns_vendor}/%{ns_project}/%{ns_subproj}/autoload.php %build : Generate a simple autoloader %{_bindir}/phpab \ - --output lib/%{ns_vendor}/%{ns_project}/%{ns_subproj}/autoload.php \ + --output src/autoload.php \ --template fedora \ - lib/%{ns_vendor}/%{ns_project} + src + +cat << 'EOF' | tee -a src/autoload.php + +// Dependencies +\Fedora\Autoloader\Dependencies::required([ + '%{_datadir}/php/%{ns_vendor}/Deprecations/autoload.php', +]); +EOF %install -mkdir -p %{buildroot}%{phpdir} -cp -rp lib/* %{buildroot}%{phpdir}/ +mkdir -p %{buildroot}%{phpdir}/%{ns_vendor}/%{ns_project} +cp -rp src %{buildroot}%{phpdir}/%{ns_vendor}/%{ns_project}/%{ns_subproj}%{major} %check @@ -96,14 +121,14 @@ mkdir vendor tests cat << 'EOF' | tee -a vendor/autoload.php -require "%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/%{ns_subproj}/autoload.php"; +require "%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/%{ns_subproj}%{major}/autoload.php"; EOF # we don't want PHPStan (which pull nette framework) : Run test suite ret=0 -for cmd in php php74 php80 php81; do +for cmd in php php80 php81 php82; do if which $cmd; then $cmd %{_bindir}/phpunit9 \ --bootstrap vendor/autoload.php \ @@ -117,16 +142,21 @@ exit $ret %files +# remirepo:1 %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md %doc composer.json -%dir %{_datadir}/php/Doctrine -%dir %{_datadir}/php/Doctrine/Common - %{_datadir}/php/Doctrine/Common/Lexer +%dir %{_datadir}/php/%{ns_vendor}/%{ns_project} + %{_datadir}/php/%{ns_vendor}/%{ns_project}/%{ns_subproj}%{major} %changelog +* Tue Dec 13 2022 Remi Collet <remi@remirepo.net> - 2.0.0-1 +- update to 2.0.0 +- rename to php-doctrine-lexer2 +- install in /usr/share/php/Doctrine/Common/Lexer2 + * Mon Feb 28 2022 Remi Collet <remi@remirepo.net> - 1.2.3-1 - update to 1.2.3 |