2020-08-21 16:31:15 +08:00
|
|
|
%{?nodejs_find_provides_and_requires}
|
|
|
|
|
%global enable_tests 1
|
|
|
|
|
Name: nodejs-node-uuid
|
2023-11-02 14:58:25 +08:00
|
|
|
Version: 3.0.0
|
2020-08-21 16:31:15 +08:00
|
|
|
Release: 1
|
|
|
|
|
Summary: Simple and fast generation of RFC4122 (v1 and v4) UUIDs for Node.js
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/broofa/node-uuid
|
2023-11-02 14:58:25 +08:00
|
|
|
Source0: https://github.com/broofa/node-uuid/archive/refs/tags/v%{version}.tar.gz
|
2020-08-21 16:31:15 +08:00
|
|
|
BuildArch: noarch
|
|
|
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
|
|
|
BuildRequires: nodejs-packaging
|
2023-11-02 14:58:25 +08:00
|
|
|
Provides: npm(node-uuid)
|
|
|
|
|
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
BuildRequires: npm(test) npm mocha
|
|
|
|
|
%endif
|
|
|
|
|
|
2020-08-21 16:31:15 +08:00
|
|
|
%description
|
|
|
|
|
This Node.js module provides simple and fast generation of RFC4122 (v1 and v4)
|
|
|
|
|
UUIDs. It runs in Node.js and all browsers and can also generate
|
|
|
|
|
cryptographically strong random numbers.
|
|
|
|
|
|
|
|
|
|
%prep
|
2023-11-02 14:58:25 +08:00
|
|
|
%setup -q -n node-uuid-%{version}
|
2020-08-21 16:31:15 +08:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/node-uuid
|
|
|
|
|
cp -pr package.json uuid.js \
|
|
|
|
|
%{buildroot}%{nodejs_sitelib}/node-uuid
|
2023-11-02 14:58:25 +08:00
|
|
|
cp -rf lib %{buildroot}%{nodejs_sitelib}/node-uuid
|
2020-08-21 16:31:15 +08:00
|
|
|
%nodejs_symlink_deps
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%nodejs_symlink_deps --check
|
2023-11-02 14:58:25 +08:00
|
|
|
npm test test/test.js
|
2020-08-21 16:31:15 +08:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc README.md
|
|
|
|
|
%license LICENSE.md
|
|
|
|
|
%{nodejs_sitelib}/node-uuid
|
|
|
|
|
|
|
|
|
|
%changelog
|
2023-11-02 14:58:25 +08:00
|
|
|
* Thu Nov 02 2023 Ge Wang <wang__ge@126.com> - 3.0.0-1
|
|
|
|
|
- Update to version 3.0.0
|
|
|
|
|
|
2020-08-21 16:31:15 +08:00
|
|
|
* Mon Aug 17 2020 wutao <wutao61@huawei.com> - 1.4.7-1
|
|
|
|
|
- Package init
|