%{?nodejs_find_provides_and_requires} %global enable_tests 1 %global packagename corser Name: nodejs-%{packagename} Version: 2.0.1 Release: 1%{?dist} Summary: CORS middleware for Node.js License: MIT URL: https://github.com/agrueneberg/%{packagename} Source0: https://github.com/agrueneberg/%{packagename}/archive/%{version}.tar.gz BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(mocha) BuildRequires: nodejs-expect-dot-js %endif %description A highly configurable, middleware compatible implementation of CORS for Node.js %prep %autosetup -n Corser-%{version} %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json lib \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' mocha %endif %files %doc README.md example %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Fri Apr 28 2017 Parag Nemade - 2.0.1-1 - initial package