47 lines
1.2 KiB
RPMSpec
47 lines
1.2 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global enable_tests 1
|
|
Name: nodejs-bytes
|
|
Version: 3.1.2
|
|
Release: 1
|
|
Summary: Utility to parse a string bytes to bytes and vice-versa
|
|
License: MIT
|
|
URL: https://github.com/visionmedia/bytes.js
|
|
Source0: https://github.com/visionmedia/bytes.js/archive/%{version}/%{name}-%{version}.tar.gz
|
|
BuildArch: noarch
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
BuildRequires: nodejs-packaging
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: npm(mocha)
|
|
%endif
|
|
%description
|
|
%summary
|
|
|
|
%prep
|
|
%autosetup -n bytes.js-%{version}
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/bytes
|
|
cp -pr package.json index.js \
|
|
%{buildroot}%{nodejs_sitelib}/bytes
|
|
%nodejs_symlink_deps
|
|
%if 0%{?enable_tests}
|
|
|
|
%check
|
|
%nodejs_symlink_deps --check
|
|
%{nodejs_sitelib}/mocha/bin/mocha --check-leaks --reporter spec
|
|
%endif
|
|
|
|
%files
|
|
%doc History.md Readme.md
|
|
%license LICENSE
|
|
%{nodejs_sitelib}/bytes
|
|
|
|
%changelog
|
|
* Fri Oct 27 2023 xu_ping <707078654@qq.com> - 3.1.2-1
|
|
- Upgrade version to 3.1.2
|
|
|
|
* Mon Aug 17 2020 Shaoqiang Kang <kangshaoqiang1@huawei.com> - 2.4.0-1
|
|
- Package init
|