# # spec file for package nodejs-cookie-parser # # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define base_name cookie-parser Name: nodejs-cookie-parser Version: 1.3.5 Release: 0 Summary: Cookie parsing with signatures License: MIT Group: Development/Languages/Other Url: https://github.com/Pita/async-stacktrace Source: http://registry.npmjs.org/%{base_name}/-/%{base_name}-%{version}.tgz BuildRequires: nodejs-packaging BuildRequires: nodejs-cookie Requires: nodejs-cookie BuildRequires: nodejs-cookie-signature Requires: nodejs-cookie-signature BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %nodejs_find_provides_and_requires %description Parse Cookie header and populate req.cookies with an object keyed by the cookie names. Optionally you may enable signed cookie support by passing a secret string, which assigns req.secret so it may be used by other middleware. %prep %setup -q -n package %build %install mkdir -p %{buildroot}%{nodejs_modulesdir}/%{base_name} cp -pr package.json lib *.js \ %{buildroot}%{nodejs_modulesdir}/%{base_name}/ mkdir -p %{buildroot}%{nodejs_modulesdir}/%{base_name}/node_modules/ for module in cookie cookie-signature ; do ln -s %{nodejs_modulesdir}/$module %{buildroot}%{nodejs_modulesdir}/%{base_name}/node_modules/ done %files %defattr(-,root,root,-) %doc README.md %{nodejs_modulesdir}/%{base_name} %changelog