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
3280ac6
Release:    11%{?dist}
78291f7
Summary:    String manipulation extensions for the Underscore.js JavaScript library
78291f7
# License text is contained within README.markdown.
78291f7
License:    MIT
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
ce31f51
BuildRequires:  rubygem-json
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
3280ac6
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-11
3280ac6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
3280ac6
127baa2
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-10
127baa2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
127baa2
6f075b1
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-9
6f075b1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
6f075b1
fd16b23
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-8
fd16b23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
fd16b23
ce31f51
* Tue Dec 06 2016 Stephen Gallagher <sgallagh@redhat.com> - 2.3.1-7
ce31f51
- Add missing BuildRequires on rubygems-json
ce31f51
3a88c49
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-6
3a88c49
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
3a88c49
ec121d8
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.1-5
ec121d8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
ec121d8
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