T.C. Hollingsworth 5517869
# nodejs binary
T.C. Hollingsworth 5517869
%__nodejs %{_bindir}/node
T.C. Hollingsworth 5517869
T.C. Hollingsworth 5517869
# nodejs library directory
T.C. Hollingsworth 5517869
%nodejs_sitelib %{_prefix}/lib/node_modules
T.C. Hollingsworth 5517869
T.C. Hollingsworth c3da87e
#arch specific library directory
T.C. Hollingsworth c3da87e
#for future-proofing only; we don't do multilib
T.C. Hollingsworth c3da87e
%nodejs_sitearch %{nodejs_sitelib}
T.C. Hollingsworth c3da87e
T.C. Hollingsworth 5517869
# currently installed nodejs version
T.C. Hollingsworth 5517869
%nodejs_version %(%{__nodejs} -v | sed s/v//)
T.C. Hollingsworth 5517869
T.C. Hollingsworth 5517869
# symlink dependencies so `npm link` works
T.C. Hollingsworth 5517869
# this should be run in every module's %%install section
T.C. Hollingsworth d73ff2e
# pass --check to work in the current directory instead of the buildroot
T.C. Hollingsworth d73ff2e
# pass --no-devdeps to ignore devDependencies when --check is used
T.C. Hollingsworth a3faf37
%nodejs_symlink_deps %{_rpmconfigdir}/nodejs-symlink-deps %{nodejs_sitelib}
T.C. Hollingsworth 753bbec
T.C. Hollingsworth 753bbec
# patch package.json to fix a dependency
T.C. Hollingsworth 753bbec
# see `man npm-json` for details on writing dependencies for package.json files
T.C. Hollingsworth 753bbec
# e.g. `%%nodejs_fixdep frobber` makes any version of frobber do
T.C. Hollingsworth 753bbec
#      `%%nodejs_fixdep frobber '>1.0'` requires frobber > 1.0
T.C. Hollingsworth 753bbec
#      `%%nodejs_fixdep -r frobber removes the frobber dep
T.C. Hollingsworth a3faf37
%nodejs_fixdep %{_rpmconfigdir}/nodejs-fixdep
T.C. Hollingsworth 7cb1934
T.C. Hollingsworth 7cb1934
# macro to filter unwanted provides from Node.js binary native modules
T.C. Hollingsworth 7cb1934
%nodejs_default_filter %{expand: \
T.C. Hollingsworth 7cb1934
%global __provides_exclude_from ^%{nodejs_sitearch}/.*\\.node$
T.C. Hollingsworth 7cb1934
}
T.C. Hollingsworth 3c3551a
T.C. Hollingsworth 3c3551a
# no-op macro to allow spec compatibility with EPEL
T.C. Hollingsworth 3c3551a
%nodejs_find_provides_and_requires %{nil}