%global npmname logform Name: nodejs-%{npmname} Version: 2.1.2 Release: 1%{?dist} Summary: Mutable object format designed for chaining & objectMode streams License: MIT URL: https://www.npmjs.com/package/%{npmname} Source0: https://github.com/winstonjs/logform/archive/%{version}/%{name}-%{version}.tar.gz # Stop the tests from trying to test the transpiled nodejs # We can't ship it because it needs the babel compiler, and # I'm not going to package that just for this. Patch0: nodejs-logform-no-transpiled-tests.patch BuildRequires: nodejs-packaging BuildRequires: mocha BuildRequires: nodejs-assume BuildRequires: nodejs-colors BuildRequires: nodejs-fast-safe-stringify BuildRequires: nodejs-fecha BuildRequires: nodejs-ms BuildRequires: nodejs-triple-beam BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch %description A mutable object-based log format designed for chaining & objectMode streams. %prep %autosetup -n %{npmname}-%{version} -p1 # Hopefully, this is okay. %nodejs_fixdep ms %nodejs_fixdep fecha %build # Nothing to build, this is a noarch package %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{npmname} cp -a *.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/*.test.js %files %{nodejs_sitelib}/%{npmname}/ %license LICENSE %doc README.md examples/ %changelog * Tue Apr 28 2020 Ben Rosser - 2.1.2-1 - Initial package for Fedora.