%{?nodejs_find_provides_and_requires} %global packagename generate-function %global enable_tests 1 Name: nodejs-generate-function Version: 2.0.0 Release: 1%{?dist} Summary: Module that helps you write generated functions in Node License: MIT URL: https://github.com/mafintosh/generate-function Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # license was added to the github repo after the 2.0.0 release, so pulling it from master Source1: https://raw.githubusercontent.com/mafintosh/generate-function/master/LICENSE ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(tape) %endif Requires: nodejs %description Module that helps you write generated functions in Node %prep %setup -q -n package cp -p %{SOURCE1} . %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json *.js \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check %{_bindir}/tape test.js %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Thu Oct 29 2015 Jared Smith - 2.0.0-1 - Initial packaging