#TODO probably wrong script, see https://xmrig.com/docs/miner/build/ubuntu
#TODO customization - https://xmrig.com/docs/miner/cmake-options
[source]
git = "https://github.com/xmrig/xmrig"
rev = "8084ff37a5c8935c649a2e362da0fe570c79a2c2"
[build]
template = "custom"
dependencies = [
    "openssl1",
    "libuv",
]
script = """
COOKBOOK_CONFIGURE="cmake"
COOKBOOK_CONFIGURE_FLAGS=(
    -DCMAKE_BUILD_TYPE=Release
    -DCMAKE_CROSSCOMPILING=True
    -DCMAKE_EXE_LINKER_FLAGS="-static"
    -DCMAKE_INSTALL_PREFIX="/"
    -DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}"
    -DCMAKE_SYSTEM_NAME=Generic
    -DCMAKE_SYSTEM_PROCESSOR="$(echo "${TARGET}" | cut -d - -f1)"
    -DCMAKE_VERBOSE_MAKEFILE=On
    -DOPENSSL_ROOT_DIR="${COOKBOOK_SYSROOT}"
"${COOKBOOK_SOURCE}"
)
cookbook_configure
"""
