Skip to content

Commit

Permalink
bmake: add version dated 20230522
Browse files Browse the repository at this point in the history
bmake is some port from BSD make. For some reason parts of
the NVIDIA container-tools need this to build from source.

IMHO complete nonsense, but have it separated out reduces
the clutter when dealing with building the container tools.
(At least there is a fitting XKCD, https://xkcd.com/2347/)
thomas committed May 24, 2023
1 parent 615c175 commit 6f11484
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions bmake-20230522-0.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#! /bin/sh

# COOKIE=$(mcookie|cut -c-8); grep -v V_GREP_ME $0 > /dev/shm/runme-$COOKIE.sh ; sleep 0.3; exec bash /dev/shm/runme-$COOKIE.sh
# TESTING=1

# bmake: Portable version of the NetBSD make build tool
# homepage: https://www.crufty.net
# comment: https://xkcd.com/2347/

set -xe

PKG=bmake
VERSION=20230522
BUILD=0

PREFIX=/pkg/$PKG-$VERSION-$BUILD
if [ -n "$TESTING" ]; then PREFIX=/scratch/local2/$PKG-$VERSION-$BUILD ; fi

PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin
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 )
export TMPDIR=$BUILD_TMPDIR

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

mkdir -p $PREFIX/build
cd $PREFIX/build

# orig: https://www.crufty.net/ftp/pub/sjg/bmake-20230522.tar.gz
BEEHIVE=https://beehive.molgen.mpg.de/17b7100f4e9323b41bb811b2fba87fac/bmake-20230522.tar.gz
test -e bmake-$VERSION.tar.gz || wget -nv $BEEHIVE
test -d bmake || tar -xf bmake-$VERSION.tar.gz
cd bmake
./boot-strap --prefix=$PREFIX op=build
./boot-strap --prefix=$PREFIX op=install

exit

0 comments on commit 6f11484

Please sign in to comment.