diff --git a/nodejs-underscore.spec b/nodejs-underscore.spec index 7685998..29ac49f 100644 --- a/nodejs-underscore.spec +++ b/nodejs-underscore.spec @@ -2,9 +2,15 @@ %global enable_tests 0 +%if 0%{?fedora} +%global installdir %{_jsdir}/underscore +%else +%global installdir %{_datadir}/javascript/underscore +%endif + Name: nodejs-underscore Version: 1.6.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: JavaScript's functional programming helper library License: MIT Group: System Environment/Libraries @@ -23,8 +29,11 @@ ExclusiveArch: %{nodejs_arches} noarch ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif -BuildRequires: nodejs-packaging +%if 0%{?fedora} BuildRequires: web-assets-devel +%endif + +BuildRequires: nodejs-packaging BuildRequires: npm(uglify-js) %if 0%{?enable_tests} @@ -39,7 +48,9 @@ extending any core JavaScript objects. %package -n js-underscore Summary: JavaScript's functional programming helper library Group: System Environment/Libraries +%if 0%{?fedora} Requires: web-assets-filesystem +%endif %description -n js-underscore Underscore.js is a utility-belt library for JavaScript that provides support @@ -62,10 +73,10 @@ mkdir -p %{buildroot}%{nodejs_sitelib}/underscore cp -pr package.json underscore.js underscore-min.js underscore-min.map \ %{buildroot}%{nodejs_sitelib}/underscore -#install browser version -mkdir -p %{buildroot}%{_jsdir}/underscore +# Install browser version +mkdir -p %{buildroot}%{installdir} cp -pr underscore.js underscore-min.js underscore-min.map \ - %{buildroot}%{_jsdir}/underscore + %{buildroot}%{installdir} # No dependencies. # %%nodejs_symlink_deps @@ -85,9 +96,13 @@ cp -pr underscore.js underscore-min.js underscore-min.map \ %files -n js-underscore %doc LICENSE README.md -%{_jsdir}/underscore +%{installdir} + %changelog +* Sat Apr 26 2014 Jamie Nguyen - 1.6.0-2 +- add jsdir logic for EL6 + * Fri Apr 18 2014 Jamie Nguyen - 1.6.0-1 - update to upstream release 1.6.0