Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 46 lines (34 sloc) 1.18 KB
#! /bin/sh
set -xe
umask 022
PKG=apptainer
VERSION=1.2.4
BUILD=0
PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/package/bin
PREFIX=/pkg/$PKG-$VERSION-$BUILD
if [ -n "$TESTING" ]; then PREFIX=/scratch/local2/$PKG-$VERSION-$BUILD ; fi
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
source $PREFIX/profile
# needed for ~/.cache/go-build ...
BUILD_TMPDIR=/scratch/local2/$PKG-$VERSION-$BUILD.$USER.build.tmp
test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR )
mkdir -p $BUILD_TMPDIR/home
export TMPDIR=$BUILD_TMPDIR
export HOME=$BUILD_TMPDIR/home
mkdir -p $PREFIX/build
cd $PREFIX/build
# orig: https://github.com/apptainer/apptainer/releases/download/v1.2.4/apptainer-1.2.4.tar.gz
BEEHIVE=https://beehive.molgen.mpg.de/d28b382f79b54f3da5c5867cb99f2edf/apptainer-1.2.4.tar.gz
test -e apptainer-$VERSION.tar.gz || wget --no-verbose $BEEHIVE
test -d apptainer-$VERSION || tar -xf apptainer-$VERSION.tar.gz
cd apptainer-$VERSION
./mconfig -b ./build -p $PREFIX
mkdir -p build
cd build
make
make install
exit