Blame nodejs-underscore-dot-string.spec

78291f7
%{?nodejs_find_provides_and_requires}
78291f7
78291f7
%global enable_tests 0
78291f7
T.C. Hollingsworth a39d305
%if 0%{?fedora}
T.C. Hollingsworth a39d305
%global enable_minify 1
T.C. Hollingsworth a39d305
%endif
T.C. Hollingsworth a39d305
78291f7
Name:       nodejs-underscore-dot-string
78291f7
Version:    2.3.1
4071bae
Release:    4%{?dist}
78291f7
Summary:    String manipulation extensions for the Underscore.js JavaScript library
78291f7
# License text is contained within README.markdown.
78291f7
License:    MIT
78291f7
Group:      System Environment/Libraries
78291f7
URL:        https://github.com/epeli/underscore.string
78291f7
Source0:    http://registry.npmjs.org/underscore.string/-/underscore.string-%{version}.tgz
78291f7
BuildArch:  noarch
78291f7
78291f7
# Building fails due to incorrectly determined file encoding.
78291f7
# Pull request sent: https://github.com/epeli/underscore.string/pull/210
78291f7
Patch0:     %{name}-2.3.1-Ensure-correct-encoding.patch
78291f7
78291f7
BuildRequires:  nodejs-devel
T.C. Hollingsworth a39d305
T.C. Hollingsworth a39d305
%if 0%{?enable_minify}
78291f7
BuildRequires:  rubygem-rake
78291f7
BuildRequires:  rubygem-uglifier
T.C. Hollingsworth a39d305
%endif
78291f7
78291f7
%if 0%{?enable_tests}
78291f7
BuildRequires:  npm(qunit)
78291f7
BuildRequires:  phantomjs
78291f7
%endif
78291f7
78291f7
%description
78291f7
%{summary}.
78291f7
78291f7
78291f7
%prep
78291f7
%setup -q -n package
78291f7
%patch0 -p1
78291f7
# Pre-minified files must be removed and minified manually.
78291f7
rm -f dist/*
78291f7
78291f7
78291f7
%build
T.C. Hollingsworth a39d305
%if 0%{?enable_minify}
78291f7
/usr/bin/rake build
T.C. Hollingsworth a39d305
%endif
78291f7
78291f7
78291f7
%install
78291f7
mkdir -p %{buildroot}%{nodejs_sitelib}/underscore.string
T.C. Hollingsworth a39d305
cp -pr package.json lib/ \
78291f7
    %{buildroot}%{nodejs_sitelib}/underscore.string
78291f7
T.C. Hollingsworth a39d305
%if 0%{?enable_minify}
T.C. Hollingsworth a39d305
cp -pr dist/ \
T.C. Hollingsworth a39d305
    %{buildroot}%{nodejs_sitelib}/underscore.string
T.C. Hollingsworth a39d305
%endif
T.C. Hollingsworth a39d305
78291f7
%nodejs_symlink_deps
78291f7
78291f7
78291f7
%if 0%{?enable_tests}
78291f7
%check
78291f7
ln -sf %{nodejs_sitelib} .
78291f7
%endif
78291f7
78291f7
78291f7
%files
78291f7
%doc README.markdown
78291f7
%{nodejs_sitelib}/underscore.string
78291f7
78291f7
78291f7
%changelog
4071bae
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.1-4
4071bae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
4071bae
T.C. Hollingsworth a39d305
* Mon Dec 09 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.3.1-3
T.C. Hollingsworth a39d305
- conditionalize minification; disable on EPEL due to missing deps
T.C. Hollingsworth a39d305
17cccf0
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.1-2
17cccf0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
17cccf0
78291f7
* Fri Jun 21 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 2.3.1-1
78291f7
- initial package