%{?nodejs_find_provides_and_requires} #tap is not available %global enable_tests 0 %global packagename ecstatic Name: nodejs-%{packagename} Version: 2.1.0 Release: 1%{?dist} Summary: A static file server middleware that works with core http, express or on the CLI License: MIT URL: https://github.com/jfhbrook/node-%{packagename} Source0: https://github.com/jfhbrook/node-%{packagename}/archive/%{version}.tar.gz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(tap) %endif %description A static file server middleware that works with core http, express or on the CLI. %prep %autosetup -n node-%{packagename}-%{version} %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json lib tools \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' tap --coverage test/*.js %endif %files %doc README.md %license LICENSE.txt %{nodejs_sitelib}/%{packagename} %changelog * Fri Apr 28 2017 Parag Nemade - 2.1.0-1 - initial package