%global npm_name tiddlywiki Name: nodejs-%{npm_name} Version: 5.1.23 Release: 1%{?dist} Summary: A non-linear personal web notebook for Node.js and browsers License: BSD URL: https://tiddlywiki.com/ Source0: http://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz Source1: %{npm_name}-%{version}-nm-dev.tgz Source2: %{npm_name}-%{version}-bundled-licenses.txt BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch Requires: nodejs BuildRequires: nodejs-devel %description %{summary}. %prep %setup -q -n package cp %{SOURCE2} . %build %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pr package.json %{buildroot}%{nodejs_sitelib}/%{npm_name} mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}/bin install -p -D -m0755 tiddlywiki.js %{buildroot}%{nodejs_sitelib}/%{npm_name}/bin/tiddlywiki.js mkdir -p %{buildroot}%{_bindir} ln -sf %{nodejs_sitelib}/%{npm_name}/bin/tiddlywiki.js %{buildroot}%{_bindir}/tiddlywiki.js %check %{__nodejs} -e 'require("./")' # Setup bundled dev node_modules for testing # Note: this cannot be in %%prep or the dev node_modules # can get pulled into the regular rpm tar xfz %{SOURCE1} %files %doc readme.md %license %{npm_name}-%{version}-bundled-licenses.txt %{nodejs_sitelib}/%{npm_name} %{_bindir}/%{npm_name}.js %changelog * Wed Jan 20 2021 W. Michael Petullo - 5.1.23-1 - Initial package