export DOTNET_CLI_TELEMETRY_OPTOUT=1

abinfo "Building OpenTabletDriver..."

if ab_match_arch amd64; then
    arch=x64
elif ab_match_arch arm64; then
    arch=arm64
elif ab_match_arch riscv64; then
    arch=riscv64
elif ab_match_arch ppc64el; then
    arch=ppc64le
    # Note: CoreCLR has no ppc64le support
    mono="--use-mono-runtime"
elif ab_match_arch loongarch64; then
    arch=loongarch64
elif ab_match_arch loongarch64_nosimd; then
    arch=loongarch64
else
    aberr "Unsupported architecture."
fi
"$SRCDIR"/eng/bash/package.sh --runtime linux-$arch --package Generic --output "$PKGDIR"

# Note: Setting PKGDIR to $PKGDIR/files so that Autobuild can pick it up and
# package binaries from there.
PKGDIR="$PKGDIR"/files
