Specfile tweaks

Make the template more reusable for v18 and v16

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
Stephen Gallagher 2023-02-28 18:33:48 -05:00
parent b8c1833746
commit 7ad58e1a63
No known key found for this signature in database
GPG Key ID: 45DB85A568286D11
2 changed files with 18 additions and 7 deletions

View File

@ -46,9 +46,9 @@
%global nodejs_major 19 %global nodejs_major 19
%global nodejs_minor 7 %global nodejs_minor 7
%global nodejs_patch 0 %global nodejs_patch 0
%global nodejs_abi %{nodejs_major}.%{nodejs_minor}
# nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h # nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h
%global nodejs_soversion 111 %global nodejs_soversion 111
%global nodejs_abi %{nodejs_soversion}
%global nodejs_version %{nodejs_major}.%{nodejs_minor}.%{nodejs_patch} %global nodejs_version %{nodejs_major}.%{nodejs_minor}.%{nodejs_patch}
%global nodejs_release %{baserelease} %global nodejs_release %{baserelease}
%global nodejs_envr %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release} %global nodejs_envr %{nodejs_epoch}:%{nodejs_version}-%{nodejs_release}
@ -121,14 +121,15 @@
%global npm_envr %{npm_epoch}:%{npm_version}-%{npm_release} %global npm_envr %{npm_epoch}:%{npm_version}-%{npm_release}
%global npm_obsoletes 1:8.19.2-1.18.12.1.3
# uvwasi - from deps/uvwasi/include/uvwasi.h # uvwasi - from deps/uvwasi/include/uvwasi.h
%global uvwasi_version 0.0.15 %global uvwasi_version 0.0.15
# histogram_c - assumed from timestamps # histogram_c - assumed from timestamps
%global histogram_version 0.9.7 %global histogram_version 0.9.7
# ada URL parser
%global ada_version 1.0.1
Name: nodejs20 Name: nodejs20
Epoch: %{nodejs_epoch} Epoch: %{nodejs_epoch}
@ -298,6 +299,12 @@ Provides: bundled(icu) = %{icu_version}
Provides: bundled(uvwasi) = %{uvwasi_version} Provides: bundled(uvwasi) = %{uvwasi_version}
Provides: bundled(histogram) = %{histogram_version} Provides: bundled(histogram) = %{histogram_version}
%if 0%{?nodejs_major} > 9
# Upstream has added a new URL parser that has no option to build as a shared
# library (19.7.0+)
Provides: bundled(ada) = ${ada_version}
%endif
%description %description
Node.js is a platform built on Chrome's JavaScript runtime \ Node.js is a platform built on Chrome's JavaScript runtime \
@ -413,8 +420,10 @@ Provides: npm(npm) = %{npm_version}
# Satisfy dependency requests for "npm" # Satisfy dependency requests for "npm"
Provides: npm = %{npm_envr} Provides: npm = %{npm_envr}
%if 0%{?nodejs_default}
# Obsolete the old 'npm' package # Obsolete the old 'npm' package
Obsoletes: npm < %{npm_obsoletes} Obsoletes: npm < 1:9
%endif
%description -n %{pkgname}-npm %description -n %{pkgname}-npm

View File

@ -121,8 +121,6 @@
%global npm_envr %{npm_epoch}:%{npm_version}-%{npm_release} %global npm_envr %{npm_epoch}:%{npm_version}-%{npm_release}
%global npm_obsoletes 1:8.19.2-1.18.12.1.3
# uvwasi - from deps/uvwasi/include/uvwasi.h # uvwasi - from deps/uvwasi/include/uvwasi.h
%global uvwasi_version @UVWASI_VERSION@ %global uvwasi_version @UVWASI_VERSION@
@ -301,9 +299,11 @@ Provides: bundled(icu) = %{icu_version}
Provides: bundled(uvwasi) = %{uvwasi_version} Provides: bundled(uvwasi) = %{uvwasi_version}
Provides: bundled(histogram) = %{histogram_version} Provides: bundled(histogram) = %{histogram_version}
%if 0%{?nodejs_major} > 9
# Upstream has added a new URL parser that has no option to build as a shared # Upstream has added a new URL parser that has no option to build as a shared
# library (19.7.0+) # library (19.7.0+)
Provides: bundled(ada) = ${ada_version} Provides: bundled(ada) = ${ada_version}
%endif
%description %description
@ -420,8 +420,10 @@ Provides: npm(npm) = %{npm_version}
# Satisfy dependency requests for "npm" # Satisfy dependency requests for "npm"
Provides: npm = %{npm_envr} Provides: npm = %{npm_envr}
%if 0%{?nodejs_default}
# Obsolete the old 'npm' package # Obsolete the old 'npm' package
Obsoletes: npm < %{npm_obsoletes} Obsoletes: npm < 1:9
%endif
%description -n %{pkgname}-npm %description -n %{pkgname}-npm