#!/bin/bash # ============================================================================ # DarkForge Linux — Phase 0, Chapter 6: Tar # ============================================================================ # Purpose: Cross-compile GNU tar (archive utility). # Inputs: ${LFS}/sources/tar-1.35.tar.xz # Outputs: tar in ${LFS}/usr/bin/ # Ref: LFS 13.0 §6.15 # ============================================================================ set -euo pipefail source "${LFS}/sources/darkforge-env.sh" PACKAGE="tar" VERSION="1.35" SRCDIR="${LFS}/sources" echo "=== Building ${PACKAGE}-${VERSION} (Temporary Tool) ===" cd "${SRCDIR}" tar -xf "${PACKAGE}-${VERSION}.tar.xz" cd "${PACKAGE}-${VERSION}" ./configure \ --prefix=/usr \ --host="${LFS_TGT}" \ --build="$(build-aux/config.guess)" make make DESTDIR="${LFS}" install cd "${SRCDIR}" rm -rf "${PACKAGE}-${VERSION}" echo "=== ${PACKAGE}-${VERSION} complete ==="