#!/usr/bin/env modbuild

pbuild::configure() {
    :
}

pbuild::compile() {
    cd "$SRC_DIR/main/source" || exit 1
    ./scons.py -j10 mode=release bin
}

pbuild::install() {
    # Copy the contents of the source code into <PREFIX>
    cp -r "$SRC_DIR/main/"* "$PREFIX/"

    # Ensure target directory exists
    mkdir -p "$PREFIX/bin"

    # Copy compiled binaries to the installation directory
    install -m 755 "$SRC_DIR/main/source/bin/"* "$PREFIX/bin/"
}
