45 lines
1.0 KiB
RPMSpec
45 lines
1.0 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global enable_tests 1
|
|
%global module_name wrappy
|
|
Name: nodejs-wrappy
|
|
Version: 1.0.2
|
|
Release: 1
|
|
Summary: Callback wrapping utility
|
|
License: ISC
|
|
URL: https://github.com/npm/wrappy
|
|
Source0: https://github.com/npm/wrappy/archive/v%{version}.tar.gz
|
|
BuildArch: noarch
|
|
BuildRequires: nodejs-packaging
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: npm(tap)
|
|
%endif
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
%description
|
|
Callback wrapping utility for node.js
|
|
|
|
%prep
|
|
%setup -q -n wrappy-%{version}
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
|
|
cp -pr wrappy.js package.json \
|
|
%{buildroot}%{nodejs_sitelib}/%{module_name}
|
|
%{nodejs_symlink_deps}
|
|
%if 0%{?enable_tests}
|
|
|
|
%check
|
|
%{nodejs_symlink_deps} --check
|
|
tap test/*.js
|
|
%endif
|
|
|
|
%files
|
|
%doc README.md
|
|
%license LICENSE
|
|
%{nodejs_sitelib}/%{module_name}
|
|
|
|
%changelog
|
|
* Wed Aug 12 2020 wangyue <wangyue92@huawei.com> - 1.0.2-1
|
|
- package init
|