61 lines
1.2 KiB
RPMSpec
61 lines
1.2 KiB
RPMSpec
|
|
%{?nodejs_find_provides_and_requires}
|
||
|
|
|
||
|
|
# Disable tests due to the way errors are now thrown
|
||
|
|
%global enable_tests 0
|
||
|
|
|
||
|
|
Name: nodejs-resolve
|
||
|
|
Version: 1.7.1
|
||
|
|
Release: 1
|
||
|
|
Summary: Resolve like require.resolve() on behalf of files asynchronously/synchronously
|
||
|
|
|
||
|
|
License: MIT
|
||
|
|
URL: https://github.com/substack/node-resolve
|
||
|
|
Source0: https://registry.npmjs.org/resolve/-/resolve-%{version}.tgz
|
||
|
|
BuildArch: noarch
|
||
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
||
|
|
|
||
|
|
BuildRequires: nodejs-packaging
|
||
|
|
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
BuildRequires: npm(tap) npm(tape)
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%description
|
||
|
|
%{summary}.
|
||
|
|
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -n package
|
||
|
|
|
||
|
|
|
||
|
|
%build
|
||
|
|
#nothing to do
|
||
|
|
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/resolve
|
||
|
|
cp -pr package.json index.js lib/ \
|
||
|
|
%{buildroot}%{nodejs_sitelib}/resolve
|
||
|
|
|
||
|
|
%nodejs_symlink_deps
|
||
|
|
|
||
|
|
|
||
|
|
%check
|
||
|
|
%nodejs_symlink_deps --check
|
||
|
|
%__nodejs -e "require('./')"
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
%tap test/*.js
|
||
|
|
%endif
|
||
|
|
|
||
|
|
|
||
|
|
%files
|
||
|
|
%{!?_licensedir:%global license %doc}
|
||
|
|
%doc readme.markdown example/
|
||
|
|
%license LICENSE
|
||
|
|
%{nodejs_sitelib}/resolve
|
||
|
|
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Wed Aug 19 2020 wangxiao <wangxiao65@huawei.com> - 1.7.1-1
|
||
|
|
- package init
|