Files
darkforge/toolchain/scripts/159-findutils.sh
2026-03-20 15:09:30 +01:00

40 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# ============================================================================
# DarkForge Linux — Phase 3, Chapter 8: findutils
# ============================================================================
# Purpose: Build findutils (find, xargs, locate, updatedb).
# Essential utilities for searching files and directories.
# Inputs: /sources/findutils-4.10.0.tar.xz
# Outputs: findutils binaries in /usr/bin/, libraries in /usr/lib/
# Assumes: Running inside chroot
# Ref: LFS 13.0 §8.64
# ============================================================================
set -euo pipefail
source /sources/toolchain-scripts/100-chroot-env.sh
PACKAGE="findutils"
VERSION="4.10.0"
echo "=== Building ${PACKAGE}-${VERSION} ==="
cd /sources
tar -xf "${PACKAGE}-${VERSION}.tar.xz"
cd "${PACKAGE}-${VERSION}"
./configure --prefix=/usr --localstatedir=/var/lib/locate
make
# Optional: run tests
# make check || true
make install
# Some packages expect /usr/bin/find and /usr/bin/xargs to be on $PATH
# They should already be there, but verify the binaries exist
ls -v /usr/bin/find /usr/bin/xargs
cd /sources
rm -rf "${PACKAGE}-${VERSION}"
echo "=== ${PACKAGE}-${VERSION} complete ==="