[nodejs-underscore-dot-string/el6: 2/2] conditionalize minification; disable on EPEL due to missing deps

T.C. Hollingsworth patches at fedoraproject.org
Mon Dec 9 16:34:34 UTC 2013


commit a39d305ac2a7ed4d3cd7b8a17493fa4964cac098
Author: T.C. Hollingsworth <tchollingsworth at gmail.com>
Date:   Mon Dec 9 09:34:04 2013 -0700

    conditionalize minification; disable on EPEL due to missing deps

 nodejs-underscore-dot-string.spec |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/nodejs-underscore-dot-string.spec b/nodejs-underscore-dot-string.spec
index 489323f..17b3544 100644
--- a/nodejs-underscore-dot-string.spec
+++ b/nodejs-underscore-dot-string.spec
@@ -2,9 +2,13 @@
 
 %global enable_tests 0
 
+%if 0%{?fedora}
+%global enable_minify 1
+%endif
+
 Name:       nodejs-underscore-dot-string
 Version:    2.3.1
-Release:    2%{?dist}
+Release:    3%{?dist}
 Summary:    String manipulation extensions for the Underscore.js JavaScript library
 # License text is contained within README.markdown.
 License:    MIT
@@ -18,8 +22,11 @@ BuildArch:  noarch
 Patch0:     %{name}-2.3.1-Ensure-correct-encoding.patch
 
 BuildRequires:  nodejs-devel
+
+%if 0%{?enable_minify}
 BuildRequires:  rubygem-rake
 BuildRequires:  rubygem-uglifier
+%endif
 
 %if 0%{?enable_tests}
 BuildRequires:  npm(qunit)
@@ -38,14 +45,21 @@ rm -f dist/*
 
 
 %build
+%if 0%{?enable_minify}
 /usr/bin/rake build
+%endif
 
 
 %install
 mkdir -p %{buildroot}%{nodejs_sitelib}/underscore.string
-cp -pr package.json dist/ lib/ \
+cp -pr package.json lib/ \
     %{buildroot}%{nodejs_sitelib}/underscore.string
 
+%if 0%{?enable_minify}
+cp -pr dist/ \
+    %{buildroot}%{nodejs_sitelib}/underscore.string
+%endif
+
 %nodejs_symlink_deps
 
 
@@ -61,6 +75,9 @@ ln -sf %{nodejs_sitelib} .
 
 
 %changelog
+* Mon Dec 09 2013 T.C. Hollingsworth <tchollingsworth at gmail.com> - 2.3.1-3
+- conditionalize minification; disable on EPEL due to missing deps
+
 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.3.1-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list