nodejs-qs/nodejs-qs.spec
2020-08-20 10:55:34 +08:00

50 lines
1.3 KiB
RPMSpec

%{?nodejs_find_provides_and_requires}
%global enable_tests 1
Name: nodejs-qs
Version: 6.5.1
Release: 1
Summary: Query string parser for Node.js
License: BSD
URL: https://github.com/ljharb/qs
Source0: https://registry.npmjs.org/qs/-/qs-%{version}.tgz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
BuildRequires: npm(iconv-lite)
%if 0%{?enable_tests}
BuildRequires: npm(tape)
%endif
%description
This is a query string parser for node and the browser supporting nesting,
as it was removed from 0.3.x, so this library provides the previous and
commonly desired behavior (and twice as fast). Used by express, connect
and others.
%prep
%setup -q -n package
%build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/qs
cp -p package.json %{buildroot}%{nodejs_sitelib}/qs
mkdir -p %{buildroot}%{nodejs_sitelib}/qs/lib
install -p -m644 lib/*.js %{buildroot}%{nodejs_sitelib}/qs/lib
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%if 0%{?enable_tests}
%__nodejs test
%endif
%files
%doc README.md CHANGELOG.md
%license LICENSE
%{nodejs_sitelib}/qs
%changelog
* Fri Aug 14 2020 wangyue <wangyue92@huawei.com> - 6.5.1-1
- Package init