diff --git a/node16/node.c b/node16/node.c new file mode 100644 index 0000000000..716f5f66bf --- /dev/null +++ b/node16/node.c @@ -0,0 +1,29 @@ + +#include +#include +#include +#include +#include + +#define NAME "node16" + +#define WRAP PREFIX "/bin/" NAME +#define REAL PREFIX "/libexec/" NAME "/node" + +int main(int argn, char **argv) +{ + char *path; + + argv[0] = REAL; + if ((path = getenv("NODE")) != NULL) + if (strcmp(path, NAME) != 0 && strcmp(path, WRAP) != 0) + argv[0] = path; + + if (execvp(argv[0], argv) == -1) { + fprintf(stderr, "node: ERROR: failed to execute \"%s\": %s\n", argv[0], strerror(errno)); + exit(1); + } + + return 0; +} + diff --git a/node16/node16.patch b/node16/node16.patch new file mode 100644 index 0000000000..aa3c68a53b --- /dev/null +++ b/node16/node16.patch @@ -0,0 +1,424 @@ +Index: common.gypi +--- common.gypi.orig 2021-04-20 13:30:12.000000000 +0200 ++++ common.gypi 2021-04-20 20:28:46.089838000 +0200 +@@ -173,7 +173,7 @@ + }], + ], + }, +- 'cflags': [ '-O3' ], ++ 'cflags': [ '-O2' ], + 'conditions': [ + ['OS=="linux"', { + 'conditions': [ +@@ -374,7 +374,7 @@ + 'ldflags': [ '-pthread' ], + }], + [ 'OS in "linux freebsd openbsd solaris android aix cloudabi"', { +- 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], ++ 'cflags': [ '-Wno-unused-parameter', ], + 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++1y' ], + 'defines': [ '__STDC_FORMAT_MACROS' ], + 'ldflags': [ '-rdynamic' ], +@@ -486,10 +486,7 @@ + '-fno-strict-aliasing', + ], + 'WARNING_CFLAGS': [ +- '-Wall', +- '-Wendif-labels', +- '-W', +- '-Wno-unused-parameter', ++ '-Wno-unused-parameter' + ], + }, + 'target_conditions': [ +Index: deps/uv/common.gypi +--- deps/uv/common.gypi.orig 2021-04-20 13:30:13.000000000 +0200 ++++ deps/uv/common.gypi 2021-04-20 20:28:46.089975000 +0200 +@@ -46,7 +46,7 @@ + 'Release': { + 'defines': [ 'NDEBUG' ], + 'cflags': [ +- '-O3', ++ '-O2', + ], + 'msvs_settings': { + 'VCCLCompilerTool': { +Index: deps/uv/uv.gyp +--- deps/uv/uv.gyp.orig 2021-04-20 13:30:13.000000000 +0200 ++++ deps/uv/uv.gyp 2021-04-20 20:28:46.090103000 +0200 +@@ -178,7 +178,7 @@ + 'src/unix/udp.c', + ], + 'link_settings': { +- 'libraries': [ '-lm' ], ++ 'libraries': [ '-lz', '-lm' ], + 'conditions': [ + ['OS=="solaris"', { + 'ldflags': [ '-pthreads' ], +Index: deps/v8/src/base/platform/platform-freebsd.cc +--- deps/v8/src/base/platform/platform-freebsd.cc.orig 2021-04-20 13:30:13.000000000 +0200 ++++ deps/v8/src/base/platform/platform-freebsd.cc 2021-04-20 20:28:46.090222000 +0200 +@@ -28,6 +28,7 @@ + #include // index + + #include ++#include + + #undef MAP_TYPE + +Index: deps/v8/src/wasm/wasm-result.cc +--- deps/v8/src/wasm/wasm-result.cc.orig 2021-04-20 13:30:14.000000000 +0200 ++++ deps/v8/src/wasm/wasm-result.cc 2021-04-20 20:28:46.090724000 +0200 +@@ -2,6 +2,8 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + ++#include ++ + #include "src/wasm/wasm-result.h" + + #include "src/execution/isolate-inl.h" +Index: lib/dns.js +--- lib/dns.js.orig 2021-04-20 13:30:15.000000000 +0200 ++++ lib/dns.js 2021-04-20 20:28:46.090840000 +0200 +@@ -150,6 +150,10 @@ + req.hostname = hostname; + req.oncomplete = all ? onlookupall : onlookup; + ++ /* FreeBSD getaddrinfo(3) knows AI_V4MAPPED, but dislikes it */ ++ if (process.platform === "freebsd") ++ hints &= ~(exports.V4MAPPED); ++ + const err = cares.getaddrinfo( + req, toASCII(hostname), family, hints, verbatim + ); +Index: lib/internal/modules/cjs/loader.js +--- lib/internal/modules/cjs/loader.js.orig 2021-04-20 13:30:15.000000000 +0200 ++++ lib/internal/modules/cjs/loader.js 2021-04-20 20:28:46.091036000 +0200 +@@ -1218,7 +1218,10 @@ + path.resolve(process.execPath, '..') : + path.resolve(process.execPath, '..', '..'); + +- const paths = [path.resolve(prefixDir, 'lib', 'node')]; ++ const paths = [ ++ path.resolve(prefixDir, '..', 'lib', 'node', 'usr'), ++ path.resolve(prefixDir, '..', 'lib', 'node', 'pkg') ++ ]; + + if (homeDir) { + ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_libraries')); +Index: src/crypto/crypto_aes.cc +--- src/crypto/crypto_aes.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_aes.cc 2021-04-20 20:28:46.091177000 +0200 +@@ -10,8 +10,8 @@ + #include "threadpoolwork-inl.h" + #include "v8.h" + +-#include +-#include ++#include "openssl/bn.h" ++#include "openssl/aes.h" + + #include + +Index: src/crypto/crypto_bio.cc +--- src/crypto/crypto_bio.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_bio.cc 2021-04-20 20:28:46.091294000 +0200 +@@ -25,7 +25,7 @@ + #include "allocated_buffer-inl.h" + #include "util-inl.h" + +-#include ++#include "openssl/bio.h" + + #include + #include +Index: src/crypto/crypto_common.cc +--- src/crypto/crypto_common.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_common.cc 2021-04-20 20:28:46.091456000 +0200 +@@ -11,14 +11,14 @@ + #include "memory_tracker-inl.h" + #include "v8.h" + +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++#include "openssl/ec.h" ++#include "openssl/ecdh.h" ++#include "openssl/evp.h" ++#include "openssl/pem.h" ++#include "openssl/x509v3.h" ++#include "openssl/hmac.h" ++#include "openssl/rand.h" ++#include "openssl/pkcs12.h" + + #include + #include +Index: src/crypto/crypto_common.h +--- src/crypto/crypto_common.h.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_common.h 2021-04-20 20:28:46.091556000 +0200 +@@ -5,8 +5,8 @@ + + #include "node_crypto.h" + #include "v8.h" +-#include +-#include ++#include "openssl/ssl.h" ++#include "openssl/x509v3.h" + + #include + #include +Index: src/crypto/crypto_context.cc +--- src/crypto/crypto_context.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_context.cc 2021-04-20 20:28:46.091754000 +0200 +@@ -11,10 +11,10 @@ + #include "util.h" + #include "v8.h" + +-#include +-#include ++#include "openssl/x509.h" ++#include "openssl/pkcs12.h" + #ifndef OPENSSL_NO_ENGINE +-#include ++#include "openssl/engine.h" + #endif // !OPENSSL_NO_ENGINE + + namespace node { +Index: src/crypto/crypto_dsa.cc +--- src/crypto/crypto_dsa.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_dsa.cc 2021-04-20 20:28:46.091853000 +0200 +@@ -7,8 +7,8 @@ + #include "threadpoolwork-inl.h" + #include "v8.h" + +-#include +-#include ++#include "openssl/bn.h" ++#include "openssl/dsa.h" + + #include + +Index: src/crypto/crypto_keys.h +--- src/crypto/crypto_keys.h.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_keys.h 2021-04-20 20:28:46.091966000 +0200 +@@ -11,7 +11,7 @@ + #include "node_worker.h" + #include "v8.h" + +-#include ++#include "openssl/evp.h" + + #include + #include +Index: src/crypto/crypto_rsa.cc +--- src/crypto/crypto_rsa.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_rsa.cc 2021-04-20 20:28:46.092090000 +0200 +@@ -10,8 +10,8 @@ + #include "threadpoolwork-inl.h" + #include "v8.h" + +-#include +-#include ++#include "openssl/bn.h" ++#include "openssl/rsa.h" + + namespace node { + +Index: src/crypto/crypto_spkac.h +--- src/crypto/crypto_spkac.h.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_spkac.h 2021-04-20 20:28:46.092181000 +0200 +@@ -6,7 +6,7 @@ + #include "env.h" + #include "v8.h" + +-#include ++#include "openssl/evp.h" + + namespace node { + namespace crypto { +Index: src/crypto/crypto_timing.cc +--- src/crypto/crypto_timing.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_timing.cc 2021-04-20 20:28:46.092269000 +0200 +@@ -5,7 +5,7 @@ + #include "v8.h" + #include "node.h" + +-#include ++#include "openssl/crypto.h" + + namespace node { + +Index: src/crypto/crypto_tls.h +--- src/crypto/crypto_tls.h.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_tls.h 2021-04-20 20:28:46.092375000 +0200 +@@ -32,7 +32,7 @@ + #include "stream_wrap.h" + #include "v8.h" + +-#include ++#include "openssl/ssl.h" + + #include + +Index: src/crypto/crypto_util.h +--- src/crypto/crypto_util.h.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_util.h 2021-04-20 20:28:46.092517000 +0200 +@@ -12,15 +12,15 @@ + #include "v8.h" + #include "string_bytes.h" + +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++#include "openssl/err.h" ++#include "openssl/evp.h" ++#include "openssl/ec.h" ++#include "openssl/kdf.h" ++#include "openssl/rsa.h" ++#include "openssl/dsa.h" ++#include "openssl/ssl.h" + #ifndef OPENSSL_NO_ENGINE +-# include ++# include "openssl/engine.h" + #endif // !OPENSSL_NO_ENGINE + // The FIPS-related functions are only available + // when the OpenSSL itself was compiled with FIPS support. +Index: src/inspector_socket_server.cc +--- src/inspector_socket_server.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/inspector_socket_server.cc 2021-04-20 20:28:46.092647000 +0200 +@@ -20,7 +20,7 @@ + bool include_protocol); + namespace { + +-static const uint8_t PROTOCOL_JSON[] = { ++static uint8_t PROTOCOL_JSON[] = { + #include "v8_inspector_protocol_json.h" // NOLINT(build/include_order) + }; + +Index: src/node_constants.cc +--- src/node_constants.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/node_constants.cc 2021-04-20 20:28:46.092815000 +0200 +@@ -36,10 +36,10 @@ + + + #if HAVE_OPENSSL +-#include +-#include ++#include "openssl/ec.h" ++#include "openssl/ssl.h" + #ifndef OPENSSL_NO_ENGINE +-#include ++#include "openssl/engine.h" + #endif // !OPENSSL_NO_ENGINE + #endif // HAVE_OPENSSL + +Index: src/node_metadata.cc +--- src/node_metadata.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/node_metadata.cc 2021-04-20 20:28:46.092915000 +0200 +@@ -10,7 +10,7 @@ + #include "zlib.h" + + #if HAVE_OPENSSL +-#include ++#include "openssl/opensslv.h" + #endif // HAVE_OPENSSL + + #ifdef OPENSSL_INFO_QUIC +Index: src/util.h +--- src/util.h.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/util.h 2021-04-20 20:28:46.093071000 +0200 +@@ -150,14 +150,23 @@ + } \ + } while (0) + ++#undef CHECK_EQ + #define CHECK_EQ(a, b) CHECK((a) == (b)) ++#undef CHECK_GE + #define CHECK_GE(a, b) CHECK((a) >= (b)) ++#undef CHECK_GT + #define CHECK_GT(a, b) CHECK((a) > (b)) ++#undef CHECK_LE + #define CHECK_LE(a, b) CHECK((a) <= (b)) ++#undef CHECK_LT + #define CHECK_LT(a, b) CHECK((a) < (b)) ++#undef CHECK_NE + #define CHECK_NE(a, b) CHECK((a) != (b)) ++#undef CHECK_NULL + #define CHECK_NULL(val) CHECK((val) == nullptr) ++#undef CHECK_NOT_NULL + #define CHECK_NOT_NULL(val) CHECK((val) != nullptr) ++#undef CHECK_IMPLIES + #define CHECK_IMPLIES(a, b) CHECK(!(a) || (b)) + + #ifdef DEBUG +@@ -185,6 +194,7 @@ + #endif + + ++#undef UNREACHABLE + #define UNREACHABLE(...) \ + ERROR_AND_ABORT("Unreachable code reached" __VA_OPT__(": ") __VA_ARGS__) + +Index: tools/install.py +--- tools/install.py.orig 2021-04-20 13:30:16.000000000 +0200 ++++ tools/install.py 2021-04-20 20:28:46.093182000 +0200 +@@ -147,10 +147,7 @@ + action(['deps/v8/tools/gdbinit'], 'share/doc/node/') + action(['deps/v8/tools/lldb_commands.py'], 'share/doc/node/') + +- if 'freebsd' in sys.platform or 'openbsd' in sys.platform: +- action(['doc/node.1'], 'man/man1/') +- else: +- action(['doc/node.1'], 'share/man/man1/') ++ action(['doc/node.1'], 'man/man1/') + + if 'true' == variables.get('node_install_npm'): npm_files(action) + +Index: tools/v8_gypfiles/toolchain.gypi +--- tools/v8_gypfiles/toolchain.gypi.orig 2021-04-20 13:30:16.000000000 +0200 ++++ tools/v8_gypfiles/toolchain.gypi 2021-04-20 20:28:46.093385000 +0200 +@@ -1087,12 +1087,6 @@ + ['OS=="solaris"', { + 'defines': [ '__C99FEATURES__=1' ], # isinf() etc. + }], +- ['OS=="freebsd" or OS=="openbsd"', { +- 'cflags': [ '-I/usr/local/include' ], +- }], +- ['OS=="netbsd"', { +- 'cflags': [ '-I/usr/pkg/include' ], +- }], + ['OS=="aix"', { + 'defines': [ + # Support for malloc(0) +@@ -1235,8 +1229,8 @@ + # Don't use -O3 with sanitizers. + ['asan==0 and msan==0 and lsan==0 \ + and tsan==0 and ubsan==0 and ubsan_vptr==0', { +- 'cflags': ['-O3'], +- 'cflags!': ['-O2'], ++ 'cflags': ['-O2'], ++ 'cflags!': ['-O3'], + }, { + 'cflags': ['-O2'], + 'cflags!': ['-O3'], +@@ -1283,8 +1277,8 @@ + # Don't use -O3 with sanitizers. + ['asan==0 and msan==0 and lsan==0 \ + and tsan==0 and ubsan==0 and ubsan_vptr==0', { +- 'cflags': ['-O3'], +- 'cflags!': ['-O2'], ++ 'cflags': ['-O2'], ++ 'cflags!': ['-O3'], + }, { + 'cflags': ['-O2'], + 'cflags!': ['-O3'], diff --git a/node16/node16.spec b/node16/node16.spec new file mode 100644 index 0000000000..98bc0fe11f --- /dev/null +++ b/node16/node16.spec @@ -0,0 +1,196 @@ +## +## node16.spec -- OpenPKG RPM Package Specification +## Copyright (c) 2000-2021 OpenPKG Project +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package version +%define V_opkg 16.0.0 +%define V_dist 16.0.0 + +# package information +Name: node16 +Summary: Node JavaScript Run-Time (V16) +URL: http://nodejs.org/ +Vendor: Node Foundation +Packager: OpenPKG Project +Distribution: OpenPKG Community +Class: PLUS +Group: Web +License: MIT/BSD +Version: %{V_opkg} +Release: 20210424 + +# package options +%option with_icu yes +%option with_node no + +# list of sources +Source0: https://nodejs.org/download/release/v%{V_dist}/node-v%{V_dist}.tar.xz +Source1: node.c +Patch0: node16.patch + +# build information +BuildPreReq: OpenPKG, openpkg >= 20160101, make, gcc, gcc::with_cxx = yes, python, pkgconfig +PreReq: OpenPKG, openpkg >= 20160101 +BuildPreReq: openssl11, libexecinfo, zlib, libuv, nghttp2 +PreReq: openssl11, libexecinfo, zlib, libuv, nghttp2 +%if "%{with_icu}" == "yes" +BuildPreReq: icu +PreReq: icu +%endif +%if "%{with_node}" == "yes" +Provides: node = %{version} +%endif + +%description + Node.js (V16) provides an easy way to build scalable network servers + in JavaScript. It is an event-driven I/O environment based on Google + V8 JavaScript virtual machine version 9.0.257.17. + +%track + prog node16 = { + version = %{V_dist} + url = https://nodejs.org/download/release/ + regex = v(16\.\d+\.\d+)/ + } + +%prep + %setup -q -n node-v%{V_dist} + %patch -p0 + +%build + # provide local tool wrapper scripts as we cannot + # reliably pass the includes via configure variables + cflags="-I`pwd`/deps/v8" + cflags="$cflags -I`pwd`/deps/v8/include" + cflags="$cflags -I`pwd`/deps/uv/include" + cflags="$cflags -I`pwd`/deps/cares/include" +%if "%{with_icu}" != "yes" + cflags="$cflags -I`pwd`/deps/icu-small/source/common" +%endif + cflags="$cflags -I`pwd`/deps/llhttp/include" + cflags="$cflags -I`pwd`/deps/http_parser" + cflags="$cflags %{l_cppflags openssl11 .}" + ldflags="%{l_ldflags openssl11 .}" + mkdir tool + for tool in gcc g++ c%{l_nil}c c++; do + ( echo "#!/bin/sh" + echo "exec %{l_prefix}/bin/$tool $cflags $ldflags \${1+\"\$@\"}" + ) >tool/$tool + chmod a+x tool/$tool + done + PATH="`pwd`/tool:$PATH" + + # configure program + libs="-lexecinfo -lz" + case "%{l_platform -t} " in + *-linux* ) libs="$libs -ldl" ;; + esac + CC="gcc" \ + CXX="g++" \ + CFLAGS="%{l_cflags -O}" \ + CXXFLAGS="%{l_cxxflags -O} -Wno-deprecated-declarations" \ + CPPFLAGS="%{l_cppflags openssl11 .}" \ + LDFLAGS="%{l_ldflags openssl11 .}" \ + LIBS="$libs" \ + %{l_prefix}/bin/python ./configure \ + --prefix=%{l_prefix} \ + --shared-openssl \ + --shared-openssl-includes=%{l_prefix}/include/openssl11 \ + --shared-openssl-libpath=%{l_prefix}/lib/openssl11 \ + --shared-openssl-libname="ssl,crypto" \ + --shared-zlib \ + --shared-zlib-includes=%{l_prefix}/include \ + --shared-zlib-libpath=%{l_prefix}/lib \ + --shared-zlib-libname="z" \ + --shared-libuv \ + --shared-libuv-includes=%{l_prefix}/include \ + --shared-libuv-libpath=%{l_prefix}/lib \ + --shared-libuv-libname="uv" \ + --shared-nghttp2 \ + --shared-nghttp2-includes=%{l_prefix}/include \ + --shared-nghttp2-libpath=%{l_prefix}/lib \ + --shared-nghttp2-libname="nghttp2" \ +%if "%{with_icu}" == "yes" + --with-intl=system-icu \ +%else + --with-intl=small-icu \ +%endif + --with-snapshot \ + --without-npm \ + --download=none + + # build program + %{l_make} %{l_mflags -O} + + # build wrapper + %{l_cc} %{l_cflags -O} %{l_cppflags} -DPREFIX="\"%{l_prefix}\"" %{l_ldflags} \ + -o node-wrapper %{SOURCE node.c} + +%install + # install program + ( PATH="`pwd`/tool:$PATH" + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + ) || exit $? + + # install wrapper + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/libexec/node16 + mv $RPM_BUILD_ROOT%{l_prefix}/bin/node \ + $RPM_BUILD_ROOT%{l_prefix}/libexec/node16/node + %{l_shtool} install -c -s -m 755 \ + node-wrapper $RPM_BUILD_ROOT%{l_prefix}/bin/node + + # post-installation strip-down + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true + rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/dtrace + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/systemtap + rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc + +%if "%{with_node}" == "yes" + # create NPM package installation areas + %{l_shtool} mkdir -f -p -m 755 \ + $RPM_BUILD_ROOT%{l_prefix}/lib/node/usr \ + $RPM_BUILD_ROOT%{l_prefix}/lib/node/pkg +%endif + + # post-adjust installation + mv $RPM_BUILD_ROOT%{l_prefix}/bin/node \ + $RPM_BUILD_ROOT%{l_prefix}/bin/node16 + mv $RPM_BUILD_ROOT%{l_prefix}/include/node \ + $RPM_BUILD_ROOT%{l_prefix}/include/node16 + mv $RPM_BUILD_ROOT%{l_prefix}/man/man1/node.1 \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/node16.1 + +%if "%{with_node}" == "yes" + # shim as Node + ln -s node16 $RPM_BUILD_ROOT%{l_prefix}/bin/node + ln -s node16 $RPM_BUILD_ROOT%{l_prefix}/include/node + ln -s node16.1 $RPM_BUILD_ROOT%{l_prefix}/man/man1/node.1 +%endif + + # determine installation files + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean + diff --git a/node16/version.sh b/node16/version.sh new file mode 100644 index 0000000000..c5b100c4f9 --- /dev/null +++ b/node16/version.sh @@ -0,0 +1,3 @@ +#!/bin/sh +PATH=/openpkg/bin:$PATH +NODE=node16 /openpkg/bin/node -e 'console.log(process.versions)'