4e5a2f6e67
- nodejs-symlink-deps: don't create an empty node_modules dir when a module has no dependencies - nodes-fixdep: support adding deps when none exist - use libexecdir for RPM helper scripts (per packaging guidelines discussion) - Add the full set of headers usually bundled with node as deps to nodejs-devel. This way `npm install` for native modules that assume the stuff bundled with node exists will usually "just work".
25 lines
938 B
Plaintext
25 lines
938 B
Plaintext
# nodejs binary
|
|
%__nodejs %{_bindir}/node
|
|
|
|
# nodejs library directory
|
|
%nodejs_sitelib %{_prefix}/lib/node_modules
|
|
|
|
#arch specific library directory
|
|
#for future-proofing only; we don't do multilib
|
|
%nodejs_sitearch %{nodejs_sitelib}
|
|
|
|
# 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
|
|
# pass the module name if the npm metadata is incorrect (e.g. multiple versions)
|
|
%nodejs_symlink_deps %{_libexecdir}/nodejs/nodejs-symlink-deps %{nodejs_sitelib}
|
|
|
|
# patch package.json to fix a dependency
|
|
# see `man npm-json` for details on writing dependencies for package.json files
|
|
# e.g. `%%nodejs_fixdep frobber` makes any version of frobber do
|
|
# `%%nodejs_fixdep frobber '>1.0'` requires frobber > 1.0
|
|
# `%%nodejs_fixdep -r frobber removes the frobber dep
|
|
%nodejs_fixdep %{_libexecdir}/nodejs/nodejs-fixdep
|