Big script
This commit is contained in:
39
toolchain/scripts/147-libelf.sh
Executable file
39
toolchain/scripts/147-libelf.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
# ============================================================================
|
||||
# DarkForge Linux — Phase 3, Chapter 8.50: Libelf
|
||||
# ============================================================================
|
||||
# Purpose: Build libelf (from elfutils), a library for reading and writing
|
||||
# ELF binaries. Required for many development tools and dpack.
|
||||
# Inputs: /sources/elfutils-0.192.tar.bz2
|
||||
# Outputs: libelf library and header files in /usr/
|
||||
# Assumes: Running inside chroot
|
||||
# Ref: LFS 13.0 §8.50
|
||||
# ============================================================================
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
source /sources/toolchain-scripts/100-chroot-env.sh
|
||||
|
||||
PACKAGE="elfutils"
|
||||
VERSION="0.192"
|
||||
|
||||
echo "=== Building ${PACKAGE}-${VERSION} (libelf from elfutils) ==="
|
||||
|
||||
pkg_extract "${PACKAGE}-${VERSION}.tar.bz2"
|
||||
cd "${PACKAGE}-${VERSION}"
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--disable-debuginfod \
|
||||
--libdir=/usr/lib \
|
||||
--sbindir=/usr/sbin
|
||||
|
||||
make
|
||||
make install
|
||||
|
||||
# Create symlink for compatibility
|
||||
cd /usr/lib
|
||||
ln -sfv libelf.so.1 libelf.so 2>/dev/null || true
|
||||
|
||||
pkg_cleanup "${PACKAGE}-${VERSION}"
|
||||
echo "=== ${PACKAGE}-${VERSION} complete ==="
|
||||
Reference in New Issue
Block a user