#!/bin/bash # ============================================================================ # DarkForge Linux — Phase 0, Chapter 7: Gettext (Chroot) # ============================================================================ # Purpose: Build gettext (internationalization framework). Many packages # require gettext's autopoint, msgfmt, etc. during their build. # Only the minimum needed tools are installed at this stage. # Inputs: /sources/gettext-0.23.1.tar.xz # Outputs: gettext utilities in /usr/ # Assumes: Running inside chroot # Ref: LFS 13.0 §7.7 # ============================================================================ set -euo pipefail PACKAGE="gettext" VERSION="0.23.1" echo "=== Building ${PACKAGE}-${VERSION} (Chroot) ===" cd /sources tar -xf "${PACKAGE}-${VERSION}.tar.xz" cd "${PACKAGE}-${VERSION}" ./configure --disable-shared make # Only install the minimum needed programs cp -v gettext-tools/src/{msgfmt,msgmerge,xgettext} /usr/bin cd /sources rm -rf "${PACKAGE}-${VERSION}" echo "=== ${PACKAGE}-${VERSION} complete ==="