Skip to content

Add Node.js 22.11.0 #305

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
52 changes: 52 additions & 0 deletions node-22.11.0-0.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#! /bin/bash

PKG=node
VERSION=22.11.0
BUILD=0

PREFIX=/pkg/$PKG-$VERSION-$BUILD
if [ -n "$TESTING" ]; then PREFIX=/dev/shm/$PKG-$VERSION-$BUILD ; fi

set -xe
umask 022

BUILD_TMPDIR=/scratch/local2/$PKG-$VERSION-$BUILD.build.tmp
test -d $BUILD_TMPDIR && chmod -c -R u+rwx $BUILD_TMPDIR && rm -rf $BUILD_TMPDIR
mkdir -p $BUILD_TMPDIR/home
export TMPDIR=$BUILD_TMPDIR
export HOME=$BUILD_TMPDIR/home

exec </dev/null

mkdir -p $PREFIX
cat >$PREFIX/profile <<-EOF
PATH=$PREFIX/bin:\$PATH
if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi
EOF
. $PREFIX/profile

export MAKEFLAGS="-j $(nproc)"

BUILDDIR=$PREFIX/build

mkdir -p $BUILDDIR
cd $BUILDDIR


test -e $PKG-v$VERSION.tar.xz || wget https://nodejs.org/dist/v$VERSION/$PKG-v$VERSION.tar.xz
#test -e $PKG-v$VERSION.tar.xz || wget https://beehive.molgen.mpg.de/e0577d374cad992d67db80ae3ec9f6d6/node-v20.13.1.tar.xz

test -d $PKG-v$VERSION || tar xvf $PKG-v$VERSION.tar.xz
cd $PKG-v$VERSION
./configure \
--prefix=$PREFIX
make
make install

for i in $PREFIX/bin/*; do
ln -sv "$i"{,-$VERSION}
done

corepack enable

exit