58 lines
1.4 KiB
RPMSpec
58 lines
1.4 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
|
|
%global enable_tests 0
|
|
%global enable_minify 1
|
|
Name: nodejs-underscore-dot-string
|
|
Version: 2.3.1
|
|
Release: 1
|
|
Summary: String manipulation extensions for the Underscore.js JavaScript library
|
|
License: MIT
|
|
URL: https://github.com/esamattis/underscore.string
|
|
Source0: http://registry.npmjs.org/underscore.string/-/underscore.string-%{version}.tgz
|
|
BuildArch: noarch
|
|
Patch0: %{name}-2.3.1-Ensure-correct-encoding.patch
|
|
BuildRequires: nodejs-devel
|
|
%if 0%{?enable_minify}
|
|
BuildRequires: rubygem-rake
|
|
BuildRequires: rubygem-uglifier
|
|
BuildRequires: rubygem-json
|
|
%endif
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: npm(qunit) phantomjs
|
|
%endif
|
|
%description
|
|
%{summary}.
|
|
|
|
%prep
|
|
%setup -q -n package
|
|
%patch0 -p1
|
|
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 lib/ \
|
|
%{buildroot}%{nodejs_sitelib}/underscore.string
|
|
%if 0%{?enable_minify}
|
|
cp -pr dist/ \
|
|
%{buildroot}%{nodejs_sitelib}/underscore.string
|
|
%endif
|
|
%nodejs_symlink_deps
|
|
%if 0%{?enable_tests}
|
|
|
|
%check
|
|
ln -sf %{nodejs_sitelib} .
|
|
%endif
|
|
|
|
%files
|
|
%doc README.markdown
|
|
%{nodejs_sitelib}/underscore.string
|
|
|
|
%changelog
|
|
* Tue Aug 11 2020 zhanghua <zhanghua40@huawei.com> - 2.3.1-1
|
|
- package init
|