live-bootstrap/steps-guix/bzip2-1.0.6/pass1.sh

21 lines
620 B
Bash

# SPDX-License-Identifier: GPL-3.0-or-later
SEED_PREFIX="/bootstrap-seeds/bzip2-1.0.6"
SYSTEM_PREFIX="/usr"
src_configure() {
:
}
src_compile() {
make "${MAKEJOBS}" CFLAGS="-O2" LDFLAGS="-static"
}
src_install() {
make CFLAGS="-O2" LDFLAGS="-static" PREFIX="${SYSTEM_PREFIX}" DESTDIR="${DESTDIR}" install
make CFLAGS="-O2" LDFLAGS="-static" PREFIX="${SEED_PREFIX}" DESTDIR="${DESTDIR}" install
# Fail early if either installed binary is not executable in this environment.
"${DESTDIR}${SYSTEM_PREFIX}/bin/bzip2" --help >/dev/null
"${DESTDIR}${SEED_PREFIX}/bin/bzip2" --help >/dev/null
}