#!/bin/bash # ============================================================================ # DarkForge Linux — Phase 0, Chapter 7: Bison (Chroot) # ============================================================================ # Purpose: Build bison (parser generator). Required by several packages # that generate parsers during their build process. # Inputs: /sources/bison-3.8.2.tar.xz # Outputs: bison in /usr/bin/ # Assumes: Running inside chroot # Ref: LFS 13.0 §7.8 # ============================================================================ set -euo pipefail PACKAGE="bison" VERSION="3.8.2" echo "=== Building ${PACKAGE}-${VERSION} (Chroot) ===" cd /sources tar -xf "${PACKAGE}-${VERSION}.tar.xz" cd "${PACKAGE}-${VERSION}" ./configure --prefix=/usr \ --docdir=/usr/share/doc/bison-${VERSION} make make install cd /sources rm -rf "${PACKAGE}-${VERSION}" echo "=== ${PACKAGE}-${VERSION} complete ==="