[php-symfony-icu] Revert "Tests always run; Require php-symfony-intl"

Shawn Iwinski siwinski at fedoraproject.org
Wed Nov 27 15:38:25 UTC 2013


commit 7effc094ff149f4be22cbbfae19b4e90c048ef6f
Author: Shawn Iwinski <siwinski at redhat.com>
Date:   Wed Nov 27 10:37:52 2013 -0500

    Revert "Tests always run; Require php-symfony-intl"
    
    This reverts commit 23796b0365aad4abc5debb98030402b20d6b8e22.

 php-symfony-icu.spec |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)
---
diff --git a/php-symfony-icu.spec b/php-symfony-icu.spec
index 73e18d0..052a0f9 100644
--- a/php-symfony-icu.spec
+++ b/php-symfony-icu.spec
@@ -12,9 +12,15 @@
 
 %global symfony_dir           %{_datadir}/php/Symfony
 
+# Tests are only run with rpmbuild --with tests
+#
+# Will be run by default when the required php-symfony-intl pkg
+# version is available
+%global with_tests  %{?_with_tests:1}%{!?_with_tests:0}
+
 Name:           php-symfony-icu
 Version:        %{github_version}
-Release:        3%{dist}
+Release:        2%{dist}
 Summary:        Symfony Icu Component
 
 Group:          Development/Libraries
@@ -23,6 +29,7 @@ URL:            https://github.com/%{github_owner}/%{github_name}
 Source0:        %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
 
 BuildArch:      noarch
+%if %{with_tests}
 # For tests
 BuildRequires:  libicu           >= %{libicu_min_ver}
 BuildRequires:  php(language)    >= %{php_min_ver}
@@ -31,11 +38,13 @@ BuildRequires:  php-symfony-intl <  %{symfony_intl_max_ver}
 # For tests: phpcompatinfo
 Requires:       php-ctype
 Requires:       php-intl
+%endif
 
 Requires:       libicu           >= %{libicu_min_ver}
 Requires:       php(language)    >= %{php_min_ver}
-Requires:       php-symfony-intl >= %{symfony_intl_min_ver}
-Requires:       php-symfony-intl <  %{symfony_intl_max_ver}
+# Disabled until the required php-symfony-intl pkg version is available
+#Requires:       php-symfony-intl >= %%{symfony_intl_min_ver}
+#Requires:       php-symfony-intl <  %%{symfony_intl_max_ver}
 # phpcompatinfo
 Requires:       php-ctype
 Requires:       php-intl
@@ -76,6 +85,7 @@ sed -i "s#%{buildroot}##" %{name}.lang
 
 
 %check
+%if %{with_tests}
 # Create tests' autoloader
 mkdir vendor
 ( cat <<'AUTOLOADER'
@@ -96,6 +106,9 @@ cat phpunit.xml.dist \
     --include-path %{buildroot}%{_datadir}/php \
     --exclude-group tty,benchmark \
     -d date.timezone="UTC"
+%else
+: Tests skipped, missing '--with tests' option
+%endif
 
 
 %files -f %{name}.lang
@@ -115,10 +128,6 @@ cat phpunit.xml.dist \
 
 
 %changelog
-* Wed Nov 27 2013 Shawn Iwinski <shawn.iwinski at gmail.com> 1.1.0-3
-- Tests always run
-- Require php-symfony-intl
-
 * Mon Nov 18 2013 Shawn Iwinski <shawn.iwinski at gmail.com> 1.1.0-2
 - Renamed from "php-symfony2-icu" to "php-symfony-icu"
 - Direct libicu dependency instead of using pkgconfig


More information about the scm-commits mailing list