#!/bin/bash # ============================================================================ # DarkForge Linux — Phase 3, Chapter 8.25: Attr (Extended Attributes) # ============================================================================ # Purpose: Build Attr, a library for managing extended attributes on # filesystem files (user-space API for xattr). # Required by ACL package. # Inputs: /sources/attr-2.5.2.tar.gz # Outputs: attr library in /usr/lib, tools in /usr/bin # Ref: LFS 13.0 §8.25 # ============================================================================ set -euo pipefail source /sources/toolchain-scripts/100-chroot-env.sh PACKAGE="attr" VERSION="2.5.2" echo "=== Building ${PACKAGE}-${VERSION} (Phase 3) ===" pkg_extract "${PACKAGE}-${VERSION}.tar.gz" cd "${PACKAGE}-${VERSION}" # Configure attr with standard options ./configure \ --prefix=/usr \ --disable-static \ --sysconfdir=/etc make make install # Install library symlinks for consistency install -Dm644 include/attr.h /usr/include/attr.h # Verify installation echo "attr version: $(/usr/bin/attr --version 2>&1 | head -1)" cd "${SRCDIR}" pkg_cleanup "${PACKAGE}-${VERSION}" echo "=== ${PACKAGE}-${VERSION} complete ==="