%global npmname zeropad Name: nodejs-%{npmname} Version: 1.1.0 Release: 1%{?dist} Summary: Zeropad your integers with optional n-length padding License: MIT URL: https://www.npmjs.com/package/%{npmname} Source0: https://registry.npmjs.org/%{npmname}/-/%{npmname}-%{version}.tgz # Add tests to npm archive. Source1: https://raw.githubusercontent.com/radiovisual/zeropad/master/test.js BuildRequires: nodejs-packaging BuildRequires: mocha BuildRequires: nodejs-negative-zero BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch %description Zeropad your integers with optional n-length padding. %prep %autosetup -n package # Copy tests into build directory. cp %SOURCE1 . %nodejs_fixdep negative-zero %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 mocha %files %{nodejs_sitelib}/%{npmname}/ %license license.md %doc readme.md %changelog * Thu Aug 16 2018 Ben Rosser - 1.1.0-1 - Initial package.