#!/bin/sh
#
# SPDX-FileCopyrightText: 2026 live-bootstrap contributors
# SPDX-License-Identifier: MIT

set -ex

cd src
tcc -m32 -march=i386 -std=c89 -static -I../../tcc/tcc-0.9.27/include -o ${BINDIR}/payload-import payload-import.c
cd ..

if match x${UPDATE_CHECKSUMS} xTrue; then
    sha256sum -o ${pkg}.checksums \
        /usr/bin/payload-import

    cp ${pkg}.checksums ${SRCDIR}
fi
