41 lines
1.1 KiB
Bash
Executable File
41 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
# ============================================================================
|
|
# DarkForge Linux — Phase 3, Chapter 8: gzip
|
|
# ============================================================================
|
|
# Purpose: Build gzip (compression utility for .gz files).
|
|
# Essential for working with compressed archives.
|
|
# Inputs: /sources/gzip-1.13.tar.xz
|
|
# Outputs: gzip, gunzip, zcat binaries in /usr/bin/
|
|
# Assumes: Running inside chroot
|
|
# Ref: LFS 13.0 §8.67 (we skip 8.66 GRUB as per DarkForge spec)
|
|
# ============================================================================
|
|
|
|
set -euo pipefail
|
|
|
|
source /sources/toolchain-scripts/100-chroot-env.sh
|
|
|
|
PACKAGE="gzip"
|
|
VERSION="1.13"
|
|
|
|
echo "=== Building ${PACKAGE}-${VERSION} ==="
|
|
|
|
cd /sources
|
|
tar -xf "${PACKAGE}-${VERSION}.tar.xz"
|
|
cd "${PACKAGE}-${VERSION}"
|
|
|
|
./configure --prefix=/usr
|
|
|
|
make
|
|
# Optional: run tests
|
|
# make check || true
|
|
make install
|
|
|
|
# Create symlinks
|
|
cd /usr/bin
|
|
ln -sfv gzip gunzip
|
|
ln -sfv gzip zcat
|
|
|
|
cd /sources
|
|
rm -rf "${PACKAGE}-${VERSION}"
|
|
echo "=== ${PACKAGE}-${VERSION} complete ==="
|