2
0
forked from pool/nodejs-common

Accepting request 869821 from devel:languages:nodejs

- set nodejs14 as default for sle15-sp3+
- set nodejs15 as default for TW

OBS-URL: https://build.opensuse.org/request/show/869821
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nodejs-common?expand=0&rev=8
This commit is contained in:
Dominique Leuenberger 2021-02-11 11:47:22 +00:00 committed by Git OBS Bridge
commit 3df27d1d04
2 changed files with 23 additions and 7 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jan 19 11:33:38 UTC 2021 - Adam Majer <adam.majer@suse.de>
- set nodejs14 as default for sle15-sp3+
- set nodejs15 as default for TW
-------------------------------------------------------------------
Tue Jun 9 10:35:06 UTC 2020 - Adam Majer <adam.majer@suse.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package nodejs-common
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -25,8 +25,8 @@
#
###########################################################
%define NODEJS_LTS 12
%define NODEJS_CURRENT 14
%define NODEJS_LTS 14
%define NODEJS_CURRENT 15
# logic for default version
# OBSOLETE ARCHES
@ -44,14 +44,22 @@
# TW
%if 0%{?suse_version} > 1500
%define default_node_ver %NODEJS_CURRENT
%endif
%else
# SLE-15 variants, variation based on SP
%if 0%{?sle_version} >= 150000 && 0%{?sle_version} < 150200
%define default_node_ver 10
%else
%if 0%{?sle_version} < 150300
%define default_node_ver 12
%else
%define default_node_ver NODEJS_LTS
%endif
%if 0%{?sle_version} >= 150200
%define default_node_ver %NODEJS_LTS
# SLE-15 variants
%endif
# TW
%endif
# END - GENERAL ARCHES
@ -63,7 +71,7 @@ Release: 0
Summary: Common files for the NodeJS ecosystem
License: MIT
Group: Development/Languages/NodeJS
Url: https://github.com/AdamMajer/nodejs-packaging
URL: https://github.com/AdamMajer/nodejs-packaging
Source1: node.c
Source2: LICENSE
Requires: nodejs
@ -112,6 +120,8 @@ the current architecture and codestream.
cp %{S:2} .
gcc ${RPM_OPT_FLAGS} -o node %{S:1}
echo "Default Node version: " %{default_node_ver}
%install
install -D -m 0755 node %{buildroot}%{_bindir}/node
ln node %{buildroot}%{_bindir}/npm