43 lines
1.4 KiB
Bash
Executable File
43 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# ============================================================================
|
|
# DarkForge Linux — Phase 3, Chapter 8.28: Libxcrypt
|
|
# ============================================================================
|
|
# Purpose: Build libxcrypt, a modern replacement for the crypt() function
|
|
# in glibc. Provides support for various password hashing algorithms
|
|
# (MD5, SHA-256, SHA-512, bcrypt, etc.).
|
|
# Required by shadow password utilities and system authentication.
|
|
# Inputs: /sources/libxcrypt-4.4.38.tar.xz
|
|
# Outputs: libxcrypt library in /usr/lib, headers in /usr/include
|
|
# Ref: LFS 13.0 §8.28
|
|
# ============================================================================
|
|
|
|
set -euo pipefail
|
|
source /sources/toolchain-scripts/100-chroot-env.sh
|
|
|
|
PACKAGE="libxcrypt"
|
|
VERSION="4.4.38"
|
|
|
|
echo "=== Building ${PACKAGE}-${VERSION} (Phase 3) ==="
|
|
|
|
pkg_extract "${PACKAGE}-${VERSION}.tar.xz"
|
|
cd "${PACKAGE}-${VERSION}"
|
|
|
|
# Configure libxcrypt with all algorithms enabled
|
|
# --enable-hashes: enable all supported hash algorithms
|
|
# --enable-obsolete-api: keep old crypt() API for compatibility
|
|
./configure \
|
|
--prefix=/usr \
|
|
--enable-hashes=all \
|
|
--enable-obsolete-api \
|
|
--disable-static
|
|
|
|
make
|
|
make install
|
|
|
|
# Verify installation
|
|
echo "libxcrypt installed: libcrypt=$(ls -1 /usr/lib/libcrypt* 2>/dev/null | head -1)"
|
|
|
|
cd "${SRCDIR}"
|
|
pkg_cleanup "${PACKAGE}-${VERSION}"
|
|
echo "=== ${PACKAGE}-${VERSION} complete ==="
|