set -ex

RUNFILE="cuda_10.0.130_410.48_linux"
TMPDIR="${SRC_DIR}/unpacked"

# unpack installer
chmod +x ${RUNFILE}
./$RUNFILE --toolkitpath $TMPDIR --toolkit --silent

# copy library to prefix
mkdir -p $PREFIX/lib
cp unpacked/extras/CUPTI/lib64/libcupti.so.10.0.130 $PREFIX/lib/

# create symlinks
cd $PREFIX/lib
ln -s libcupti.so.10.0.130 libcupti.so.10.0
ln -s libcupti.so.10.0.130 libcupti.so
