diff --git a/nodejs22.spec b/nodejs22.spec index 1c0e3c3..9cef751 100644 --- a/nodejs22.spec +++ b/nodejs22.spec @@ -1,3 +1,13 @@ +# Determine if this should be the default version for this Fedora release +# The default version will own /usr/bin/node and friends +%if 0%{?fedora} == 41 || 0%{?fedora} == 42 || 0%{?rhel} == 11 +%global nodejs_default %{nodejs_pkg_major} +%endif + +%global nodejs_default_sitelib %{_prefix}/lib/node_modules +%global nodejs_private_sitelib %{nodejs_default_sitelib}_%{nodejs_pkg_major} + + # Break circular dependencies %bcond bootstrap 0 @@ -50,15 +60,6 @@ %global nodejs_datadir %{_datarootdir}/node-%{nodejs_pkg_major} -# Determine if this should be the default version for this Fedora release -# The default version will own /usr/bin/node and friends -%if 0%{?fedora} == 41 || 0%{?fedora} == 42 || 0{?rhel} == 11 -%global nodejs_default %{nodejs_pkg_major} -%endif - -%global nodejs_default_sitelib %{_prefix}/lib/node_modules -%global nodejs_private_sitelib %{nodejs_default_sitelib}_%{nodejs_pkg_major} - # == Bundled Dependency Versions == # v8 - from deps/v8/include/v8-version.h diff --git a/packaging/nodejs.spec.j2 b/packaging/nodejs.spec.j2 index 6d33b96..474e91e 100644 --- a/packaging/nodejs.spec.j2 +++ b/packaging/nodejs.spec.j2 @@ -1,3 +1,13 @@ +# Determine if this should be the default version for this Fedora release +# The default version will own /usr/bin/node and friends +%if 0%{?fedora} == {{ FEDORA_DEFAULT_RELEASE_LOW }} || 0%{?fedora} == {{ FEDORA_DEFAULT_RELEASE_HIGH }}{{ RHEL_DEFAULT_RELEASE }} +%global nodejs_default %{nodejs_pkg_major} +%endif + +%global nodejs_default_sitelib %{_prefix}/lib/node_modules +%global nodejs_private_sitelib %{nodejs_default_sitelib}_%{nodejs_pkg_major} + + # Break circular dependencies %bcond bootstrap 0 @@ -50,15 +60,6 @@ %global nodejs_datadir %{_datarootdir}/node-%{nodejs_pkg_major} -# Determine if this should be the default version for this Fedora release -# The default version will own /usr/bin/node and friends -%if 0%{?fedora} == {{ FEDORA_DEFAULT_RELEASE_LOW }} || 0%{?fedora} == {{ FEDORA_DEFAULT_RELEASE_HIGH }}{{ RHEL_DEFAULT_RELEASE }} -%global nodejs_default %{nodejs_pkg_major} -%endif - -%global nodejs_default_sitelib %{_prefix}/lib/node_modules -%global nodejs_private_sitelib %{nodejs_default_sitelib}_%{nodejs_pkg_major} - # == Bundled Dependency Versions == # v8 - from deps/v8/include/v8-version.h