51 lines
1.3 KiB
RPMSpec
51 lines
1.3 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global enable_tests 0
|
|
Name: nodejs-gzip-size
|
|
Version: 3.0.0
|
|
Release: 1
|
|
Summary: Get the gzipped size of a string or buffer
|
|
License: MIT
|
|
URL: https://github.com/sindresorhus/gzip-size
|
|
Source0: http://registry.npmjs.org/gzip-size/-/gzip-size-%{version}.tgz
|
|
Source1: https://raw.githubusercontent.com/sindresorhus/gzip-size/v%{version}/test.js
|
|
BuildArch: noarch
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
BuildRequires: nodejs-packaging
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: npm(ava) npm(concat-stream) npm(zlib-browserify)
|
|
%endif
|
|
%description
|
|
%{summary}.
|
|
|
|
%prep
|
|
%setup -q -n package
|
|
cp -p %{SOURCE1} .
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/gzip-size
|
|
cp -pr package.json index.js \
|
|
%{buildroot}%{nodejs_sitelib}/gzip-size
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
ln -sf %{nodejs_sitelib}/gzip-size/index.js \
|
|
%{buildroot}%{_bindir}/gzip-size
|
|
%nodejs_symlink_deps
|
|
%if 0%{?enable_tests}
|
|
|
|
%check
|
|
%nodejs_symlink_deps --check
|
|
%__nodejs tap.js
|
|
%endif
|
|
|
|
%files
|
|
%{!?_licensedir:%global license %doc}
|
|
%doc *.md
|
|
%license license
|
|
%{nodejs_sitelib}/gzip-size
|
|
%{_bindir}/gzip-size
|
|
|
|
%changelog
|
|
* Thu Aug 20 2020 yaokai <yaokai13@huawei.com> - 3.0.0-1
|
|
- Package init
|