From 2e4961b1e9735252ea690849ca8af50b5b26c21e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 1 Aug 2019 08:20:30 +0200 Subject: - update to 1.1.0 - raise dependency on PHP 7.2 - sources from git snapshot - run upstream test suite during build - use classmap autoloader --- php-doctrine-lexer.spec | 85 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 63 insertions(+), 22 deletions(-) (limited to 'php-doctrine-lexer.spec') diff --git a/php-doctrine-lexer.spec b/php-doctrine-lexer.spec index 23f0cb8..1bc482f 100644 --- a/php-doctrine-lexer.spec +++ b/php-doctrine-lexer.spec @@ -9,35 +9,49 @@ # # Please preserve changelog entries # - +# Github %global github_owner doctrine %global github_name lexer -%global github_version 1.0.2 -%global github_commit 1febd6c3ef84253d7c815bed85fc622ad207a9f8 - +%global github_version 1.1.0 +%global github_commit e17f069ede36f7534b95adec71910ed1b49c74ea +%global github_short %(c=%{github_commit}; echo ${c:0:7}) +# Namespace +%global ns_vendor Doctrine +%global ns_project Common +%global ns_subproj Lexer +# Packagist %global composer_vendor doctrine %global composer_project lexer -# "php": ">=5.3.2" -%global php_min_ver 5.3.2 +# "php": ">=7.2" +%global php_min_ver 7.2 %{!?phpdir: %global phpdir %{_datadir}/php} +%global with_tests 0%{!?_without_tests:1} Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} Release: 1%{?github_release}%{?dist} Summary: Base library for a lexer that can be used in top-down, recursive descent parsers -Group: Development/Libraries License: MIT URL: https://github.com/%{github_owner}/%{github_name} -Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz +# git snapshot with tests +Source0: %{name}-%{github_version}-%{github_short}.tgz +Source1: makesrc.sh BuildArch: noarch +BuildRequires: php-fedora-autoloader-devel +%if %{with_tests} +BuildRequires: php(language) >= %{php_min_ver} +BuildRequires: php-pcre +BuildRequires: php-reflection +BuildRequires: phpunit8 +%endif # composer.json Requires: php(language) >= %{php_min_ver} -# phpcompatinfo (computed from version 1.0.1) +# phpcompatinfo (computed from version 1.1.0) Requires: php-pcre Requires: php-reflection # Autoloader @@ -52,7 +66,7 @@ parsers. This lexer is used in Doctrine Annotations and in Doctrine ORM (DQL). -Autoloader: %{phpdir}/Doctrine/Common/Lexer/autoload.php +Autoloader: %{phpdir}/%{ns_vendor}/%{ns_project}/%{ns_subproj}/autoload.php %prep @@ -60,17 +74,11 @@ Autoloader: %{phpdir}/Doctrine/Common/Lexer/autoload.php %build -: Create autoloader -cat <<'AUTOLOAD' | tee lib/Doctrine/Common/Lexer/autoload.php - - 1.1.0-1 +- update to 1.1.0 +- raise dependency on PHP 7.2 +- sources from git snapshot +- run upstream test suite during build +- use classmap autoloader + * Tue Jun 11 2019 Remi Collet - 1.0.2-1 - update to 1.0.2 -- cgit