Skip to content

node: add 12.18.3 #149

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
47 changes: 47 additions & 0 deletions node-12.18.3-0.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#! /bin/bash

PKG=node
VERSION=12.18.3
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
EOF
. $PREFIX/profile

export MAKEFLAGS="-j $(nproc)"

BUILDDIR=$PREFIX/build

mkdir -p $BUILDDIR
cd $BUILDDIR

echo wget https://nodejs.org/dist/v${VERSION}/${PKG}-v${VERSION}.tar.gz

test -e ${PKG}-v${VERSION}.tar.gz || wget https://beehive.molgen.mpg.de/28bf6a4d98b238403fa58a0805f4a979/node-v12.18.3.tar.gz
test -d ${PKG}-v${VERSION} || tar xvf ${PKG}-v${VERSION}.tar.gz

cd ${PKG}-v${VERSION}
./configure \
--prefix=$PREFIX
make
make install

for i in `ls ${PREFIX}/bin`; do
ln -sfv ${PREFIX}/bin/${i}{,-${VERSION}}
done