50 lines
1.4 KiB
Bash
Executable File
50 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# ============================================================================
|
|
# DarkForge Linux — Phase 3, Chapter 8.37: Bash (Final)
|
|
# ============================================================================
|
|
# Purpose: Build final bash shell (previously only had temporary version).
|
|
# Also create /bin/sh symlink to bash.
|
|
# Inputs: /sources/bash-5.3.tar.gz
|
|
# Outputs: bash binary in /bin/ and /bin/sh symlink
|
|
# Assumes: Running inside chroot
|
|
# Ref: LFS 13.0 §8.37
|
|
# ============================================================================
|
|
|
|
set -euo pipefail
|
|
|
|
source /sources/toolchain-scripts/100-chroot-env.sh
|
|
|
|
PACKAGE="bash"
|
|
VERSION="5.3"
|
|
|
|
echo "=== Building ${PACKAGE}-${VERSION} (Final) ==="
|
|
|
|
pkg_extract "${PACKAGE}-${VERSION}.tar.gz"
|
|
cd "${PACKAGE}-${VERSION}"
|
|
|
|
./configure \
|
|
--prefix=/usr \
|
|
--exec-prefix= \
|
|
--bindir=/bin \
|
|
--sbindir=/sbin \
|
|
--libexecdir=/usr/lib \
|
|
--sysconfdir=/etc \
|
|
--sharedstatedir=/var/lib \
|
|
--localstatedir=/var \
|
|
--libdir=/usr/lib \
|
|
--includedir=/usr/include \
|
|
--oldincludedir=/usr/include \
|
|
--infodir=/usr/share/info \
|
|
--mandir=/usr/share/man \
|
|
--without-bash-malloc \
|
|
--with-installed-readline
|
|
|
|
make
|
|
make install
|
|
|
|
# Create /bin/sh symlink (required by POSIX)
|
|
ln -sfv bash /bin/sh
|
|
|
|
pkg_cleanup "${PACKAGE}-${VERSION}"
|
|
echo "=== ${PACKAGE}-${VERSION} complete ==="
|