2020-08-28 15:05:36 +08:00
|
|
|
%{?nodejs_find_provides_and_requires}
|
|
|
|
|
|
|
|
|
|
%global enable_tests 0
|
|
|
|
|
|
|
|
|
|
Name: nodejs-which
|
|
|
|
|
Version: 1.3.0
|
|
|
|
|
Release: 1
|
|
|
|
|
Summary: A JavaScript implementation of the 'which' command
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/isaacs/node-which
|
2020-09-07 16:40:23 +08:00
|
|
|
Source0: https://github.com/isaacs/node-which/archive/v%{version}.tar.gz
|
2020-08-28 15:05:36 +08:00
|
|
|
BuildArch: noarch
|
|
|
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
|
|
|
BuildRequires: nodejs-packaging npm(isexe)
|
|
|
|
|
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
BuildRequires: npm(tap) npm(mkdirp) npm(rimraf)
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
%{summary}.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
2020-09-07 16:40:23 +08:00
|
|
|
%autosetup -n node-which-%{version}
|
2020-08-28 15:05:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
#nothing to do
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/which
|
|
|
|
|
cp -pr bin which.js package.json %{buildroot}%{nodejs_sitelib}/which
|
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
|
ln -sf ../lib/node_modules/which/bin/which %{buildroot}%{_bindir}/which-nodejs
|
|
|
|
|
%nodejs_symlink_deps
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%nodejs_symlink_deps --check
|
|
|
|
|
%__nodejs -e "require('./')"
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
%tap test/*.js
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc README.md
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{nodejs_sitelib}/which
|
|
|
|
|
%{_bindir}/which-nodejs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Aug 11 2020 wangxiao <wangxiao65@huawei.com> - 1.3.0-1
|
|
|
|
|
- package init
|