Big script
This commit is contained in:
44
toolchain/scripts/158-gawk.sh
Executable file
44
toolchain/scripts/158-gawk.sh
Executable file
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
# ============================================================================
|
||||
# DarkForge Linux — Phase 3, Chapter 8: gawk
|
||||
# ============================================================================
|
||||
# Purpose: Build gawk (GNU awk — pattern scanning and text processing).
|
||||
# Essential build tool used in many package builds.
|
||||
# Inputs: /sources/gawk-5.3.1.tar.xz
|
||||
# Outputs: gawk and awk binaries in /usr/bin/, libraries in /usr/lib/
|
||||
# Assumes: Running inside chroot
|
||||
# Ref: LFS 13.0 §8.63
|
||||
# ============================================================================
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
source /sources/toolchain-scripts/100-chroot-env.sh
|
||||
|
||||
PACKAGE="gawk"
|
||||
VERSION="5.3.1"
|
||||
|
||||
echo "=== Building ${PACKAGE}-${VERSION} ==="
|
||||
|
||||
cd /sources
|
||||
tar -xf "${PACKAGE}-${VERSION}.tar.xz"
|
||||
cd "${PACKAGE}-${VERSION}"
|
||||
|
||||
sed -i 's/extras//' Makefile.in
|
||||
|
||||
./configure --prefix=/usr
|
||||
|
||||
make
|
||||
# Optional: run tests
|
||||
# make check || true
|
||||
make install
|
||||
|
||||
# Create symlink for awk
|
||||
ln -sfv gawk /usr/bin/awk
|
||||
|
||||
# Create symlink in /usr/share/doc/gawk-VERSION/
|
||||
mkdir -pv /usr/share/doc/gawk-${VERSION}
|
||||
cp -v doc/{awkforinit.txt,awkuser.txt,pm*.pdf} /usr/share/doc/gawk-${VERSION}
|
||||
|
||||
cd /sources
|
||||
rm -rf "${PACKAGE}-${VERSION}"
|
||||
echo "=== ${PACKAGE}-${VERSION} complete ==="
|
||||
Reference in New Issue
Block a user