From 4439759dc3894f9bb4b5748207468d0a5e2253f7 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 16 May 2017 07:45:43 +0200 Subject: sync with Fedora --- php-jdorn-sql-formatter.spec | 72 ++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 39 deletions(-) (limited to 'php-jdorn-sql-formatter.spec') diff --git a/php-jdorn-sql-formatter.spec b/php-jdorn-sql-formatter.spec index e49707a..3596077 100644 --- a/php-jdorn-sql-formatter.spec +++ b/php-jdorn-sql-formatter.spec @@ -1,8 +1,8 @@ # remirepo spec file for php-jdorn-sql-formatter, from Fedora: # -# RPM spec file for php-jdorn-sql-formatter +# Fedora spec file for php-jdorn-sql-formatter # -# Copyright (c) 2015 Shawn Iwinski +# Copyright (c) 2015-2017 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -29,7 +29,7 @@ Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 2%{?dist} +Release: 5%{?dist} Summary: PHP SQL highlighting library Group: Development/Libraries @@ -38,7 +38,6 @@ URL: https://github.com/%{github_owner}/%{github_name} Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz BuildArch: noarch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # Tests %if %{with_tests} ## composer.json @@ -47,7 +46,7 @@ BuildRequires: php(language) >= %{php_min_ver} ## phpcompatinfo (computed from version 1.2.17) BuildRequires: php-pcre ## Autoloader -BuildRequires: php-composer(symfony/class-loader) +BuildRequires: php-composer(fedora/autoloader) %endif # composer.json @@ -55,7 +54,7 @@ Requires: php(language) >= %{php_min_ver} # phpcompatinfo (computed from version 1.2.17) Requires: php-pcre # Autoloader -Requires: php-composer(symfony/class-loader) +Requires: php-composer(fedora/autoloader) # Composer Provides: php-composer(%{composer_vendor}/%{composer_project}) = %{version} @@ -66,34 +65,12 @@ A lightweight php class for formatting sql statements. It can automatically indent and add line breaks in addition to syntax highlighting. +Autoloader: %{libdir}/autoload.php + %prep %setup -qn %{github_name}-%{github_commit} -: Create autoloader -(cat <<'AUTOLOAD' -register(); -} - -$fedoraClassLoader->addPrefix('SqlFormatter', __DIR__); - -return $fedoraClassLoader; -AUTOLOAD -) | tee lib/autoload.php - : Modify examples sed "s#require.*SqlFormatter.*#require_once '%{libdir}/autoload.php';#" \ -i examples/cli.php \ @@ -101,30 +78,43 @@ sed "s#require.*SqlFormatter.*#require_once '%{libdir}/autoload.php';#" \ %build -# Empty build section, nothing required +: Create autoloader +cat <<'AUTOLOAD' | tee lib/autoload.php + - 1.2.17-5 +- Switch autoloader to php-composer(fedora/autoloader) +- Test with SCLs if available + * Wed Jun 17 2015 Remi Collet - 1.2.17-2 - add backport stuff for remirepo -- cgit