%{?nodejs_find_provides_and_requires} %global packagename component-inherit %global enable_tests 1 Name: nodejs-component-inherit Version: 0.0.3 Release: 1%{?dist} Summary: Prototype inheritance utility License: MIT URL: https://github.com/component/inherit.git Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # License file not in npm tarball Source1: https://raw.githubusercontent.com/component/inherit/master/LICENSE ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: mocha BuildRequires: npm(should) %endif %description Prototype inheritance utility %prep %autosetup -n package cp -p %{SOURCE1} . %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json index.js \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/mocha --require should -R spec %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %doc *.md %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Wed Mar 29 2017 Jared Smith - 0.0.3-1 - Initial packaging