Commit b4d2988c authored by gsell's avatar gsell
Browse files

MITHRA: build recipe added

parent 8e2c28c6
#!/bin/bash
#
# OPAL Toolchain Build recipe to build MITHRA.
#
# https://gmplib.org
#
P=MITHRA
V=${MITHRA_VERSION:-2.0}
trap "otb_exit" EXIT
DOWNLOAD_URL="https://github.com/aryafallahi/mithra/archive/$V.tar.gz"
SRC_FILE="${OTB_DOWNLOAD_DIR}/$P-$V.tar.gz"
# download
test -r "${SRC_FILE}" || \
curl -L --output "$_" "${DOWNLOAD_URL}" || exit ${OTB_ERR_DOWNLOAD}
# unpack
mkdir -p "${OTB_SRC_DIR}/$P" && cd "$_" || exit ${OTB_ERR_SYSTEM}
tar xvf "${SRC_FILE}" || exit ${OTB_ERR_UNTAR}
# configure
# nothing to do
# compile and install
cd "${OTB_SRC_DIR}/$P/$P-$V" || exit ${OTB_ERR_SYSTEM}
make -j ${NJOBS} || exit ${OTB_ERR_MAKE}
make install || exit ${OTB_ERR_INSTALL}
mkdir -p "${OTB_PREFIX}/include/mithra"
for f in ./include/mithra/*; do
install -m 0644 "$f" "${OTB_PREFIX}/include/mithra"
done
install -m 0644 "./lib/libmithra.a" "${OTB_PREFIX}/lib"
# Local Variables:
# mode: sh
# sh-basic-offset: 8
# tab-width: 8
# End:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment