diff --git a/nodejs22.spec b/nodejs22.spec index be938b0..b4bd16a 100644 --- a/nodejs22.spec +++ b/nodejs22.spec @@ -1,5 +1,7 @@ # Determine if this should be the default version for this Fedora release # The default version will own /usr/bin/node and friends +%global nodejs_pkg_major 22 + %if 0%{?fedora} == 41 || 0%{?fedora} == 42 || 0%{?rhel} == 11 %global nodejs_default %{nodejs_pkg_major} %endif @@ -57,8 +59,6 @@ %global nodejs_release %{baserelease} %global nodejs_envr %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release} -%global nodejs_pkg_major 22 - %global nodejs_datadir %{_datarootdir}/node-%{nodejs_pkg_major} diff --git a/packaging/nodejs.spec.j2 b/packaging/nodejs.spec.j2 index 05dfc0e..09c649d 100644 --- a/packaging/nodejs.spec.j2 +++ b/packaging/nodejs.spec.j2 @@ -1,5 +1,7 @@ # Determine if this should be the default version for this Fedora release # The default version will own /usr/bin/node and friends +%global nodejs_pkg_major {{ NODE_PKG_MAJOR }} + %if 0%{?fedora} == {{ FEDORA_DEFAULT_RELEASE_LOW }} || 0%{?fedora} == {{ FEDORA_DEFAULT_RELEASE_HIGH }}{{ RHEL_DEFAULT_RELEASE }} %global nodejs_default %{nodejs_pkg_major} %endif @@ -57,8 +59,6 @@ %global nodejs_release %{baserelease} %global nodejs_envr %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release} -%global nodejs_pkg_major {{ NODE_PKG_MAJOR }} - %global nodejs_datadir %{_datarootdir}/node-%{nodejs_pkg_major}