nodejs-is-builtin-module/nodejs-is-builtin-module.spec

55 lines
1.4 KiB
RPMSpec
Raw Normal View History

2020-08-20 11:38:02 +08:00
%{?nodejs_find_provides_and_requires}
%global packagename is-builtin-module
%global enable_tests 0
Name: nodejs-is-builtin-module
2023-11-09 16:43:38 +08:00
Version: 3.2.1
2020-08-20 11:38:02 +08:00
Release: 1
Summary: Check if a string matches the name of a Node.js builtin module
License: MIT
URL: https://github.com/sindresorhus/is-builtin-module
Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
Source1: https://raw.githubusercontent.com/sindresorhus/is-builtin-module/v%{version}/test.js
ExclusiveArch: %{nodejs_arches} noarch
BuildArch: noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
%endif
Requires: nodejs
%description
Check if a string matches the name of a Node.js builtin module
%prep
2022-06-30 18:27:29 +08:00
%autosetup -n package -p1
2020-08-20 11:38:02 +08:00
cp -p %{SOURCE1} .
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
cp -pr package.json *.js \
%{buildroot}%{nodejs_sitelib}/%{packagename}
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%{__nodejs} test.js
%endif
%files
%{!?_licensedir:%global license %doc}
%doc *.md
%license license
%{nodejs_sitelib}/%{packagename}
%changelog
2023-11-09 16:43:38 +08:00
* Thu Nov 09 2023 wangkai <13474090681@163.com> - 3.2.1-1
- Update to 3.2.1
2022-06-30 18:27:29 +08:00
* Thu Jun 30 2022 baizhonggui <baizhonggui@h-partners.com> - 3.1.0-1
- update to 3.1.0
2020-08-20 11:38:02 +08:00
* Thu Aug 20 2020 yaokai <yaokai13@huawei.com> - 1.0.0-1
- Package init