[php-SymfonyCmfRouting] Updated to 1.2.0 (BZ #1096125)

Shawn Iwinski siwinski at fedoraproject.org
Mon Oct 20 12:28:45 UTC 2014


commit 4ae865e0cb8d1d52b8bf8a87086e716f3b29b0de
Author: Shawn Iwinski <shawn.iwinski at gmail.com>
Date:   Mon Oct 20 08:26:52 2014 -0400

    Updated to 1.2.0 (BZ #1096125)
    
    - Enabled tests by default
    - Updated URL, description, dependencies, %check, and %files
    - Added "php-composer(symfony-cmf/routing)" virtual provide
    - %license usage

 .gitignore                 |    1 +
 php-SymfonyCmfRouting.spec |  178 ++++++++++++++++++++++++++------------------
 sources                    |    4 +-
 3 files changed, 107 insertions(+), 76 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0b00a3c..317bbb2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 /php-SymfonyCmfRouting-1.0.0-4706313dc7708633cfb1228c8b44e807aa44b6bf.tar.gz
 /php-SymfonyCmfRouting-1.0.1-a98a795555d4b9d456eecceb2654bb2590320303.tar.gz
 /php-SymfonyCmfRouting-1.1.0-9f8607950cbf888ec678713a35f3d0088857c85f.tar.gz
+/php-SymfonyCmfRouting-1.2.0-c67258b875eef3cb08009bf1428499d0f01ce5e7.tar.gz
diff --git a/php-SymfonyCmfRouting.spec b/php-SymfonyCmfRouting.spec
index cd15051..6217b2b 100644
--- a/php-SymfonyCmfRouting.spec
+++ b/php-SymfonyCmfRouting.spec
@@ -1,85 +1,97 @@
+#
+# RPM spec file for php-SymfonyCmfRouting
+#
+# Copyright (c) 2013-2014 Shawn Iwinski <shawn.iwinski at gmail.com>
+#
+# License: MIT
+# http://opensource.org/licenses/MIT
+#
+# Please preserve changelog entries
+#
+
 %global github_owner    symfony-cmf
 %global github_name     Routing
-%global github_version  1.1.0
-%global github_commit   9f8607950cbf888ec678713a35f3d0088857c85f
+%global github_version  1.2.0
+%global github_commit   c67258b875eef3cb08009bf1428499d0f01ce5e7
 
+# "php": ">=5.3.3"
 %global php_min_ver     5.3.3
-
+# "symfony/*": "~2.2"
 %global symfony_min_ver 2.2
 %global symfony_max_ver 3.0
-
+# "psr/log": "~1.0"
 %global psr_log_min_ver 1.0
 %global psr_log_max_ver 2.0
 
-# Tests are only run with rpmbuild --with tests
-# Need to investigate errors
-%global with_tests   %{?_with_tests:1}%{!?_with_tests:0}
+# Build using "--without tests" to disable tests
+%global with_tests  %{?_without_tests:0}%{!?_without_tests:1}
+
+%{!?__phpunit:  %global __phpunit  %{_bindir}/phpunit}
+%{!?phpdir:     %global phpdir     %{_datadir}/php}
 
 Name:          php-SymfonyCmfRouting
 Version:       %{github_version}
-Release:       2%{?dist}
+Release:       1%{?dist}
 Summary:       Extends the Symfony2 routing component for dynamic routes and chaining
 
 Group:         Development/Libraries
 License:       MIT
-URL:           http://symfony.com/doc/master/cmf/components/routing/index.html
+URL:           http://symfony.com/doc/master/cmf/book/routing.html
 Source0:       https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
 
 BuildArch:     noarch
 %if %{with_tests}
-# For tests
-BuildRequires: php(language) >= %{php_min_ver}
-BuildRequires: php-pear(pear.phpunit.de/PHPUnit)
-BuildRequires: php-pear(pear.symfony.com/Config) >= %{symfony_min_ver}
-BuildRequires: php-pear(pear.symfony.com/Config) <  %{symfony_max_ver}
-BuildRequires: php-pear(pear.symfony.com/DependencyInjection) >= %{symfony_min_ver}
-BuildRequires: php-pear(pear.symfony.com/DependencyInjection) <  %{symfony_max_ver}
-BuildRequires: php-pear(pear.symfony.com/EventDispatcher) >= %{symfony_min_ver}
-BuildRequires: php-pear(pear.symfony.com/EventDispatcher) <  %{symfony_max_ver}
-BuildRequires: php-pear(pear.symfony.com/HttpKernel) >= %{symfony_min_ver}
-BuildRequires: php-pear(pear.symfony.com/HttpKernel) <  %{symfony_max_ver}
-BuildRequires: php-pear(pear.symfony.com/Routing) >= %{symfony_min_ver}
-BuildRequires: php-pear(pear.symfony.com/Routing) <  %{symfony_max_ver}
-BuildRequires: php-PsrLog >= %{psr_log_min_ver}
-BuildRequires: php-PsrLog <  %{psr_log_max_ver}
-# For tests: phpcompatinfo
+# composer.json
+BuildRequires: php(language)                   >= %{php_min_ver}
+BuildRequires: php-composer(psr/log)           >= %{psr_log_min_ver}
+BuildRequires: php-composer(psr/log)           <  %{psr_log_max_ver}
+BuildRequires: php-phpunit-PHPUnit
+BuildRequires: php-symfony-config              >= %{symfony_min_ver}
+BuildRequires: php-symfony-config              <  %{symfony_max_ver}
+BuildRequires: php-symfony-dependencyinjection >= %{symfony_min_ver}
+BuildRequires: php-symfony-dependencyinjection <  %{symfony_max_ver}
+BuildRequires: php-symfony-eventdispatcher     >= %{symfony_min_ver}
+BuildRequires: php-symfony-eventdispatcher     <  %{symfony_max_ver}
+BuildRequires: php-symfony-httpkernel          >= %{symfony_min_ver}
+BuildRequires: php-symfony-httpkernel          <  %{symfony_max_ver}
+BuildRequires: php-symfony-routing             >= %{symfony_min_ver}
+BuildRequires: php-symfony-routing             <  %{symfony_max_ver}
+# phpcompatinfo (computed from version 1.2.0)
 BuildRequires: php-pcre
 BuildRequires: php-spl
 %endif
 
-Requires:      php(language) >= %{php_min_ver}
-Requires:      php-pear(pear.symfony.com/HttpKernel) >= %{symfony_min_ver}
-Requires:      php-pear(pear.symfony.com/HttpKernel) <  %{symfony_max_ver}
-Requires:      php-pear(pear.symfony.com/Routing) >= %{symfony_min_ver}
-Requires:      php-pear(pear.symfony.com/Routing) <  %{symfony_max_ver}
-Requires:      php-PsrLog >= %{psr_log_min_ver}
-Requires:      php-PsrLog <  %{psr_log_max_ver}
-# Optional
-Requires:      php-pear(pear.symfony.com/EventDispatcher) >= %{symfony_min_ver}
-Requires:      php-pear(pear.symfony.com/EventDispatcher) <  %{symfony_max_ver}
-# phpcompatinfo
+# composer.json
+Requires:      php(language)               >= %{php_min_ver}
+Requires:      php-composer(psr/log)       >= %{psr_log_min_ver}
+Requires:      php-composer(psr/log)       <  %{psr_log_max_ver}
+Requires:      php-symfony-httpkernel      >= %{symfony_min_ver}
+Requires:      php-symfony-httpkernel      <  %{symfony_max_ver}
+Requires:      php-symfony-routing         >= %{symfony_min_ver}
+Requires:      php-symfony-routing         <  %{symfony_max_ver}
+# composer.json: optional
+Requires:      php-symfony-eventdispatcher >= %{symfony_min_ver}
+Requires:      php-symfony-eventdispatcher <  %{symfony_max_ver}
+# phpcompatinfo (computed from version 1.2.0)
 Requires:      php-pcre
 Requires:      php-spl
 
+# Composer
+Provides:      php-composer(symfony-cmf/routing) = %{version}
+
 %description
-The Symfony CMF Routing component extends the Symfony2 core routing component
-to allow more flexibility. The most important difference is that the CMF
-Routing component can load routing information from a database.
+The Symfony CMF Routing component extends the Symfony2 core routing component.
+It provides:
+* A ChainRouter to run several routers in parallel
+* A DynamicRouter that can load routes from any database and can generate
+      additional information in the route match
 
+Even though it has Symfony in its name, the Routing component does not need the
+full Symfony2 Framework and can be used in standalone projects.
 
-%prep
-%setup -q -n %{github_name}-%{github_commit}
 
-# Overwrite Tests/bootstrap.php (which uses Composer autoloader)
-# with a simple spl autoloader
-( cat <<'AUTOLOAD'
-<?php
-spl_autoload_register(function ($class) {
-    $src = str_replace(array('\\', '_'), '/', $class).'.php';
-    @include_once $src;
-});
-AUTOLOAD
-) > Tests/bootstrap.php
+%prep
+%setup -qn %{github_name}-%{github_commit}
 
 
 %build
@@ -87,58 +99,78 @@ AUTOLOAD
 
 
 %install
-mkdir -p -m 755 %{buildroot}%{_datadir}/php/Symfony/Cmf/Component/Routing
-cp -rp * %{buildroot}%{_datadir}/php/Symfony/Cmf/Component/Routing/
+mkdir -pm 0755 %{buildroot}%{phpdir}/Symfony/Cmf/Component/Routing
+cp -rp * %{buildroot}%{phpdir}/Symfony/Cmf/Component/Routing/
 
 
 %check
 %if %{with_tests}
-%{_bindir}/phpunit \
-    -d include_path="%{buildroot}%{_datadir}/php:%{pear_phpdir}" \
-    -c phpunit.xml.dist
+# Create autoloader
+mkdir vendor
+cat > vendor/autoload.php <<'AUTOLOAD'
+<?php
+
+spl_autoload_register(function ($class) {
+    $src = str_replace(array('\\', '_'), '/', $class).'.php';
+    @include_once $src;
+});
+AUTOLOAD
+
+# Create PHPUnit config w/ colors turned off
+sed 's/colors="true"/colors="false"/' phpunit.xml.dist > phpunit.xml
+
+%{__phpunit} --include-path %{buildroot}%{phpdir} -d date.timezone="UTC"
 %else
-: Tests skipped, missing '--with tests' option
+: Tests skipped
 %endif
 
 
 %files
-%doc LICENSE README.md composer.json
-%dir %{_datadir}/php/Symfony/Cmf
-%dir %{_datadir}/php/Symfony/Cmf/Component
-     %{_datadir}/php/Symfony/Cmf/Component/Routing
-%exclude %{_datadir}/php/Symfony/Cmf/Component/Routing/LICENSE
-%exclude %{_datadir}/php/Symfony/Cmf/Component/Routing/README.md
-%exclude %{_datadir}/php/Symfony/Cmf/Component/Routing/composer.json
-%exclude %{_datadir}/php/Symfony/Cmf/Component/Routing/phpunit.xml.dist
-%exclude %{_datadir}/php/Symfony/Cmf/Component/Routing/Test
-%exclude %{_datadir}/php/Symfony/Cmf/Component/Routing/Tests
+%{!?_licensedir:%global license %%doc}
+%license LICENSE
+%doc CHANGELOG.md README.md composer.json
+%dir %{phpdir}/Symfony/Cmf
+%dir %{phpdir}/Symfony/Cmf/Component
+     %{phpdir}/Symfony/Cmf/Component/Routing
+%exclude %{phpdir}/Symfony/Cmf/Component/Routing/LICENSE
+%exclude %{phpdir}/Symfony/Cmf/Component/Routing/*.md
+%exclude %{phpdir}/Symfony/Cmf/Component/Routing/composer.json
+%exclude %{phpdir}/Symfony/Cmf/Component/Routing/phpunit.xml.dist
+%exclude %{phpdir}/Symfony/Cmf/Component/Routing/Test*
 
 
 %changelog
+* Mon Oct 20 2014 Shawn Iwinski <shawn.iwinski at gmail.com> - 1.2.0-1
+- Updated to 1.2.0 (BZ #1096125)
+- Enabled tests by default
+- Updated URL, description, dependencies, %%check, and %%files
+- Added "php-composer(symfony-cmf/routing)" virtual provide
+- %%license usage
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1.0-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
 * Wed Oct 30 2013 Shawn Iwinski <shawn.iwinski at gmail.com> 1.1.0-1
-- Updated to 1.1.0
+- Updated to 1.1.0 (BZ #962129)
 - Updated required pkg versions, required pkgs, summary, URL, and description
 - php-common -> php(language)
 
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.1-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
-* Wed May 08 2013 Shawn Iwinski <shawn.iwinski at gmail.com> 1.0.1-1
-- Updated to version 1.0.1
+* Wed May 08 2013 Shawn Iwinski <shawn.iwinski at gmail.com> - 1.0.1-1
+- Updated to version 1.0.1 (BZ #958188)
 - Added php-pear(pear.symfony.com/HttpFoundation) require
 - Only run tests with "--with tests" option
 - Remove phpunit.xml.dist from packaging since tests themselves are not included
 
-* Sat Mar 09 2013 Shawn Iwinski <shawn.iwinski at gmail.com> 1.0.0-0.3.alpha4.20130306git4706313
+* Sat Mar 09 2013 Shawn Iwinski <shawn.iwinski at gmail.com> - 1.0.0-0.3.alpha4.20130306git4706313
 - Added additional commits (snapshot) beyond tagged version 1.0.0-alpha4 which
   include several Symfony 2.2 fixes
 
-* Tue Mar 05 2013 Shawn Iwinski <shawn.iwinski at gmail.com> 1.0.0-0.2.alpha4.20130121git92ee467
+* Tue Mar 05 2013 Shawn Iwinski <shawn.iwinski at gmail.com> - 1.0.0-0.2.alpha4.20130121git92ee467
 - Added globals symfony_min_ver and symfony_max_ver
 - Removed tests sub-package
 
-* Thu Jan 31 2013 Shawn Iwinski <shawn.iwinski at gmail.com> 1.0.0-0.1.alpha4.20130121git92ee467
+* Thu Jan 31 2013 Shawn Iwinski <shawn.iwinski at gmail.com> - 1.0.0-0.1.alpha4.20130121git92ee467
 - Initial package
diff --git a/sources b/sources
index dfa11b8..c5ae1ce 100644
--- a/sources
+++ b/sources
@@ -1,3 +1 @@
-b36c3ab9881d98de17e591fc43ad038c  php-SymfonyCmfRouting-1.0.0-4706313dc7708633cfb1228c8b44e807aa44b6bf.tar.gz
-e69268bae28a3bca521c20098c7e11ff  php-SymfonyCmfRouting-1.0.1-a98a795555d4b9d456eecceb2654bb2590320303.tar.gz
-0eadbb44eb239d24ab0df9de2cc7bc86  php-SymfonyCmfRouting-1.1.0-9f8607950cbf888ec678713a35f3d0088857c85f.tar.gz
+73259c6f54cf73cca81d9864caa5545a  php-SymfonyCmfRouting-1.2.0-c67258b875eef3cb08009bf1428499d0f01ce5e7.tar.gz


More information about the scm-commits mailing list