nodejs-object-assign/nodejs-object-assign.spec
wangchong1995924 6932d5fae1 package init
2020-08-20 17:33:49 +08:00

46 lines
1.1 KiB
RPMSpec

%global enable_tests 0
%global module_name object-assign
Name: nodejs-%{module_name}
Version: 4.1.1
Release: 1
Summary: ES6 Object.assign() ponyfill
License: MIT
URL: https://github.com/sindresorhus/object-assign
Source0: https://github.com/sindresorhus/object-assign/archive/v%{version}.tar.gz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(ava) npm(xo) npm(matcha) npm(lodash)
%endif
%description
%{summary}.
%prep
%setup -q -n %{module_name}-%{version}
rm -rf node_modules
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
cp -pr package.json *.js %{buildroot}%{nodejs_sitelib}/%{module_name}
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
xo && ava
match bench.js
%endif
%files
%doc readme.md
%license license
%{nodejs_sitelib}/%{module_name}
%changelog
* Thu Aug 20 2020 wangchong <wangchong56@huawei.com> - 4.1.1-1
- package init