%{?nodejs_find_provides_and_requires} %global packagename spdx-correct %global enable_tests 1 Name: nodejs-spdx-correct Version: 1.0.2 Release: 1%{?dist} Summary: Correct invalid SPDX identifiers License: ASL 2.0 URL: https://github.com/kemitchell/spdx-correct.js.git Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz Source1: https://raw.githubusercontent.com/kemitchell/spdx-correct.js/master/examples.test.js # test file wasn't included in the NPM tarball ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(tape) BuildRequires: npm(spdx-expression-parse) %endif %description correct invalid SPDX identifiers %prep %setup -q -n package # setup the test 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 %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %__nodejs examples.test.js %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Mon Dec 14 2015 Jared Smith - 1.0.2-1 - Update to upstream 1.0.2 release - Get the upstream tests working * Mon Oct 26 2015 Jared Smith - 1.0.1-1 - Initial packaging