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

42 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# ============================================================================
# DarkForge Linux — Phase 3, Chapter 8.42: Inetutils
# ============================================================================
# Purpose: Build GNU inetutils, basic network utilities (ping, telnet, ftp, etc.)
# Provides essential network diagnostic and communication tools.
# Inputs: /sources/inetutils-2.6.tar.xz
# Outputs: Network utilities in /usr/bin/, /usr/sbin/
# Assumes: Running inside chroot (no systemd)
# Ref: LFS 13.0 §8.42
# ============================================================================
set -euo pipefail
source /sources/toolchain-scripts/100-chroot-env.sh
PACKAGE="inetutils"
VERSION="2.6"
echo "=== Building ${PACKAGE}-${VERSION} (Phase 3) ==="
pkg_extract "${PACKAGE}-${VERSION}.tar.xz"
cd "${PACKAGE}-${VERSION}"
./configure \
--prefix=/usr \
--localstatedir=/var \
--disable-logger \
--disable-syslogd \
--disable-ifdconfig \
--disable-servers
make
make install
# Move programs to proper locations per LFS
mv -v /usr/bin/{hostname,dnsdomainname} /usr/sbin/ 2>/dev/null || true
mv -v /usr/bin/ifconfig /usr/sbin/ 2>/dev/null || true
pkg_cleanup "${PACKAGE}-${VERSION}"
echo "=== ${PACKAGE}-${VERSION} complete ==="