diff --git a/macros.nodejs b/macros.nodejs new file mode 100644 index 0000000..e6a1ff3 --- /dev/null +++ b/macros.nodejs @@ -0,0 +1,12 @@ +# nodejs binary +%__nodejs %{_bindir}/node + +# nodejs library directory +%nodejs_sitelib %{_prefix}/lib/node_modules + +# currently installed nodejs version +%nodejs_version %(%{__nodejs} -v | sed s/v//) + +# symlink dependencies so `npm link` works +# this should be run in every module's %%install section +%nodejs_symlink_deps %{_rpmconfigdir}/nodejs_symlink_deps %{nodejs_sitelib} \ No newline at end of file