nodejs-extend/nodejs-extend.spec
2020-08-28 18:01:43 +08:00

51 lines
1.3 KiB
RPMSpec

%{?nodejs_find_provides_and_requires}
%global enable_tests 1
%global barename extend
Name: nodejs-extend
Version: 3.0.0
Release: 1
Summary: Port of jQuery.extend for node.js and the browser
License: MIT
URL: https://www.npmjs.org/package/extend
Source0: https://registry.npmjs.org/extend/-/extend-%{version}.tgz
Source1: test-index.js
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
BuildRequires: nodejs-packaging >= 6
%if 0%{?enable_tests}
BuildRequires: npm(tape)
%endif
%description
nodejs-extend is a port of the classic extend() method from jQuery. It behaves
as you expect. It is simple, tried and true.
%prep
%setup -q -n package
install -D -p -m0644 %{SOURCE1} test/index.js
rm -rf node_modules/
%nodejs_fixdep --caret
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/extend
cp -pr package.json index.js \
%{buildroot}%{nodejs_sitelib}/extend
%nodejs_symlink_deps
%check
%if 0%{?enable_tests}
%nodejs_symlink_deps --check
node test/index.js
%endif
%files
%doc README.md
%license LICENSE
%{nodejs_sitelib}/extend/
%changelog
* Thu Aug 20 2020 Anan Fu <fuanan3@huawei.com> - 3.0.0-1
- package init