%{?nodejs_find_provides_and_requires} %global packagename inherit %global enable_tests 1 Name: nodejs-inherit Version: 2.2.2 Release: 2%{?dist} Summary: Inheritance module for Node.js and browsers License: MIT URL: http://github.com/dfilatov/node-inherit.git Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz Source1: https://raw.githubusercontent.com/dfilatov/inherit/master/LICENSE.md # license file was added after the 2.2.2 release 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(nodeunit) %endif %description Inheritance module for Node.js and browsers %prep %setup -q -n package cp -p %{SOURCE1} . %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json *.js lib/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %{_bindir}/nodeunit %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license LICENSE.md %{nodejs_sitelib}/%{packagename} %changelog * Mon Dec 14 2015 Jared Smith - 2.2.2-2 - Initial packaging