%{?nodejs_find_provides_and_requires}
%global enable_tests 1
Name: nodejs-cookie-signature
Version: 1.0.3
Release: 3%{?dist}
Summary: Node.js module to sign and unsign cookies
License: MIT
Group: System Environment/Libraries
URL: https://github.com/visionmedia/node-cookie-signature
Source0: http://registry.npmjs.org/cookie-signature/-/cookie-signature-%{version}.tgz
# The test files are not included in the npm tarball.
# Source1 is generated by running Source10, which pulls from the upstream
# version control repository.
Source1: tests-%{version}.tar.bz2
Source10: dl-tests.sh
BuildArch: noarch
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(mocha)
BuildRequires: npm(should)
%endif
%description
%{summary}.
%prep
%setup -q -n package
%setup -q -T -D -a 1 -n package
%build
#nothing to do
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/cookie-signature
cp -pr package.json index.js \
%{buildroot}%{nodejs_sitelib}/cookie-signature
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%{nodejs_sitelib}/mocha/bin/mocha --require should --reporter spec
%endif
%files
%doc History.md Readme.md
%{nodejs_sitelib}/cookie-signature
%changelog
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Mar 08 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.0.3-1
- update to upstream release 1.0.3
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Wed Jun 19 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.0.1-2
- rebuild for missing npm(cookie-signature) provides on EL6
* Wed Apr 17 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.0.1-1
- update to upstream release 1.0.1
* Mon Apr 15 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.0.0-1
- update to upstream release 1.0.0
* Tue Feb 12 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.0.1-2
- document how to retrieve "Source1: index-test.js"
* Mon Feb 11 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.0.1-1
- initial package