Move the default check to the top

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
Stephen Gallagher 2024-05-21 10:40:08 -04:00
parent 55cdb8828c
commit 4cec3c6443
2 changed files with 20 additions and 18 deletions

View File

@ -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

View File

@ -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