mirror of
https://src.fedoraproject.org/rpms/nodejs18.git
synced 2024-11-28 11:06:08 +00:00
29 lines
1.1 KiB
Text
29 lines
1.1 KiB
Text
# 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 %{_rpmconfigdir}/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 %{_rpmconfigdir}/nodejs-fixdep
|
|
|
|
# macro to filter unwanted provides from Node.js binary native modules
|
|
%nodejs_default_filter %{expand: \
|
|
%global __provides_exclude_from ^%{nodejs_sitearch}/.*\\.node$
|
|
}
|