#!/usr/bin/env bash # Build inside Docker container for Ubuntu 20.04 compatibility set -eu -o pipefail cd /hush3 # Clean previous build artifacts that may be from the host make clean 2>/dev/null || true # Clean host-built depends (native binaries won't work in container) rm -rf depends/built depends/x86_64-unknown-linux-gnu depends/work make -C depends clean 2>/dev/null || true # Build RandomX for Linux (clean, since host build is different arch/libc) cd src/RandomX rm -rf build-linux mkdir -p build-linux && cd build-linux cmake -DARCH=native .. make -j$(nproc) cd /hush3 # Run the normal build ./util/build.sh --disable-tests -j$(nproc) # Package release echo "Creating Linux release package..." VERSION=$(grep -oP 'define\(_CLIENT_VERSION.*?,\s*\K[0-9]+' configure.ac | head -4 | tr '\n' '.' | sed 's/\.$//') VERSION=${VERSION:-3.10.5} RELEASE_DIR="release-linux" mkdir -p "$RELEASE_DIR" strip -s src/hushd src/hush-cli src/hush-tx cp src/hushd src/hush-cli src/hush-tx "$RELEASE_DIR/" cp asmap.dat sapling-spend.params sapling-output.params "$RELEASE_DIR/" 2>/dev/null || true cp src/hush-arrakis-chain src/dragonxd src/dragonx-cli "$RELEASE_DIR/" rm -f "hush-${VERSION}-linux64.zip" cd "$RELEASE_DIR" zip -9 "../hush-${VERSION}-linux64.zip" * cd .. echo "Release package created: hush-${VERSION}-linux64.zip" ls -lh "hush-${VERSION}-linux64.zip"