From 8a43b5f7105f62bac6e7f85fe529f5de75c8f4c9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 14 May 2017 18:25:22 +0200 Subject: sync with Fedora --- .gitignore | 7 +++++++ php-doctrine-lexer.spec | 46 +++++++++++++++------------------------------- 2 files changed, 22 insertions(+), 31 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1ab5c4f --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/php-doctrine-lexer.spec b/php-doctrine-lexer.spec index 1036103..3d1002c 100644 --- a/php-doctrine-lexer.spec +++ b/php-doctrine-lexer.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-doctrine-lexer # -# Copyright (c) 2013-2015 Shawn Iwinski +# Copyright (c) 2013-2017 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -25,7 +25,7 @@ Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 5%{?github_release}%{?dist} +Release: 8%{?github_release}%{?dist} Summary: Base library for a lexer that can be used in top-down, recursive descent parsers Group: Development/Libraries @@ -33,7 +33,6 @@ License: MIT URL: https://github.com/%{github_owner}/%{github_name} Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # composer.json @@ -42,7 +41,7 @@ Requires: php(language) >= %{php_min_ver} Requires: php-pcre Requires: php-reflection # Autoloader -Requires: php-composer(symfony/class-loader) +Requires: php-composer(fedora/autoloader) # Composer Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} @@ -53,41 +52,28 @@ parsers. This lexer is used in Doctrine Annotations and in Doctrine ORM (DQL). +Autoloader: %{phpdir}/Doctrine/Common/Lexer/autoload.php + %prep %setup -qn %{github_name}-%{github_commit} + +%build : Create autoloader -(cat <<'AUTOLOAD' +cat <<'AUTOLOAD' | tee lib/Doctrine/Common/Lexer/autoload.php register(); -} - -$fedoraClassLoader->addPrefix('Doctrine\\Common\\Lexer\\', dirname(dirname(dirname(__DIR__)))); - -return $fedoraClassLoader; +\Fedora\Autoloader\Autoload::addPsr4('Doctrine\\Common\\Lexer\\', __DIR__); AUTOLOAD -) | tee lib/Doctrine/Common/Lexer/autoload.php - - -%build -# Empty build section, nothing required %install -rm -rf %{buildroot} mkdir -p %{buildroot}%{phpdir} cp -rp lib/* %{buildroot}%{phpdir}/ @@ -96,12 +82,7 @@ cp -rp lib/* %{buildroot}%{phpdir}/ # No upstream tests -%clean -rm -rf %{buildroot} - - %files -%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md @@ -112,6 +93,9 @@ rm -rf %{buildroot} %changelog +* Sat May 13 2017 Shawn Iwinski - 1.0.1-8 +- Switch autoloader to php-composer(fedora/autoloader) + * Sat Jun 27 2015 Shawn Iwinski - 1.0.1-5 - Updated autoloader with trailing separator -- cgit