Skip to content

Commit

Permalink
Merge pull request #261 from mariux64/add-apptainer-1.2.4
Browse files Browse the repository at this point in the history
apptainer: add version 1.2.4 (supers. 1.1.9)
  • Loading branch information
thomas authored Nov 1, 2023
2 parents 831ff74 + 7b8ad49 commit 0bf5efe
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions apptainer-1.2.4-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.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

0 comments on commit 0bf5efe

Please sign in to comment.