%global npmname text-hex Name: nodejs-%{npmname} Version: 1.0.0 Release: 1%{?dist} Summary: Transforms a given piece of text to a hex color License: MIT URL: https://www.npmjs.com/package/%{npmname} # Tests not included on NPM. Source0: https://github.com/3rd-Eden/text-hex/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: nodejs-packaging BuildRequires: mocha BuildRequires: nodejs-assume BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch %description Transforms a given piece of text to a hex color. %prep %autosetup -n %{npmname}-%{version} %build # Nothing to build, this is a noarch package %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{npmname} cp -a index.js %{buildroot}%{nodejs_sitelib}/%{npmname}/ cp -a package.json %{buildroot}%{nodejs_sitelib}/%{npmname}/ %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' mocha test.js %files %{nodejs_sitelib}/%{npmname}/ %license LICENSE %doc README.md %changelog * Tue Apr 28 2020 Ben Rosser - 1.0.0-1 - Initial package for Fedora.