nodejs-resolve-pkg/nodejs-resolve-pkg.spec

54 lines
1.3 KiB
RPMSpec
Raw Normal View History

2020-09-01 17:13:05 +08:00
%{?nodejs_find_provides_and_requires}
%global packagename resolve-pkg
%global enable_tests 0
Name: nodejs-resolve-pkg
2023-11-01 16:39:04 +08:00
Version: 2.0.0
2020-09-01 17:13:05 +08:00
Release: 1
Summary: Resolve the path of a package regardless of it having an entry
License: MIT
URL: https://github.com/sindresorhus/resolve-pkg
2020-09-08 16:01:10 +08:00
Source0: https://github.com/sindresorhus/resolve-pkg/archive/v%{version}.tar.gz
2020-09-01 17:13:05 +08:00
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging npm(resolve-from)
%if 0%{?enable_tests}
BuildRequires: npm(ava)
%endif
%description
Resolve the path of a package regardless of it having an entry
%prep
2020-09-08 16:01:10 +08:00
%autosetup -n resolve-pkg-%{version}
2020-09-01 17:13:05 +08:00
%nodejs_fixdep resolve-from
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
cp -pr package.json index.js \
%{buildroot}%{nodejs_sitelib}/%{packagename}
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%if 0%{?enable_tests}
%{_bindir}/ava
%else
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
%endif
%files
%{!?_licensedir:%global license %doc}
%doc *.md
%license license
%{nodejs_sitelib}/%{packagename}
%changelog
2023-11-01 16:39:04 +08:00
* Wed Nov 1 2023 liyanan <liyanan61@h-parners.com> - 2.0.0-1
- Update to 2.0.0
2020-09-01 17:13:05 +08:00
* Wed Aug 19 2020 wangyue <wangyue92@huawei.com> - 1.0.0-1
- package init