nodejs-tough-cookie/nodejs-tough-cookie.spec
2020-08-20 16:50:15 +08:00

49 lines
1.3 KiB
RPMSpec

%global enable_tests 1
%global srcname tough-cookie
Name: nodejs-%{srcname}
Version: 2.3.2
Release: 1
Summary: RFC6265 Cookies and Cookie Jar for Node.js
License: BSD and MPLv2.0
URL: https://www.npmjs.com/package/tough-cookie
Source0: https://github.com/salesforce/tough-cookie/archive/v%{version}/tough-cookie-%{version}.tar.gz
# https://github.com/salesforce/tough-cookie/pull/91
Patch0: nodejs-tough-cookie-expiry.patch
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(async) npm(string.prototype.repeat) npm(vows)
%endif
%description
%{summary}.
%prep
%autosetup -p 1 -n %{srcname}-%{version}
%nodejs_fixdep punycode "^2.0.0"
rm -rf node_modules
%build
#nothing to do
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname}
cp -pr package.json lib/ \
%{buildroot}%{nodejs_sitelib}/%{srcname}
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
vows --spec test/*_test.js
%endif
%files
%doc README.md
%license LICENSE
%{nodejs_sitelib}/%{srcname}
%changelog
* Tue Aug 11 2020 wutao <wutao61@huawei.com> - 2.3.2-1
- package init