Skip to content

Commit

Permalink
Add node-10.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwutz committed Jun 11, 2019
1 parent 3868cf7 commit f2e1b44
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions node-10.13.0-0.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#! /bin/bash

PKG=node
VERSION=10.13.0
BUILD=0

PREFIX=/pkg/$PKG-$VERSION-$BUILD
#PREFIX=/dev/shm/$PKG-$VERSION-$BUILD

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

test -e ${PKG}-v${VERSION}.tar.gz || wget https://nodejs.org/dist/v${VERSION}/${PKG}-v${VERSION}.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 -sv ${PREFIX}/bin/${i}{,-${VERSION}}
done

exit

0 comments on commit f2e1b44

Please sign in to comment.