Skip to content

Commit

Permalink
apptainer: Add version 1.1.9
Browse files Browse the repository at this point in the history
apptainer is the successor of singularity.
See: https://apptainer.org/
  • Loading branch information
thomas committed Jun 27, 2023
1 parent efc13d5 commit 8ebd704
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions apptainer-1.1.9-0.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#! /bin/sh

set -xe
umask 022

PKG=apptainer
VERSION=1.1.9
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.1.9/apptainer-1.1.9.tar.gz
BEEHIVE=https://beehive.molgen.mpg.de/1472e1534f7c24b99de49df84fc83650/apptainer-1.1.9.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

0 comments on commit 8ebd704

Please sign in to comment.