%{?nodejs_find_provides_and_requires} %global packagename is-my-json-valid %global enable_tests 1 Name: nodejs-is-my-json-valid Version: 2.12.2 Release: 2%{?dist} Summary: A JSONSchema validator that uses code generation to be extremely fast License: MIT URL: https://github.com/mafintosh/is-my-json-valid.git Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(generate-function) BuildRequires: npm(generate-object-property) BuildRequires: npm(jsonpointer) BuildRequires: npm(tape) BuildRequires: npm(xtend) %endif Requires: nodejs %description A JSONSchema validator that uses code generation to be extremely fast %prep %setup -q -n package %nodejs_fixdep jsonpointer %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.12.2-2 - Fix missing BuildRequires for tests * Thu Oct 29 2015 Jared Smith - 2.12.2-1 - Initial packaging