#!/bin/bash set -e # XZ Utils 5.8.1 build script # Configures and builds the package following LFS guidelines build_dir=$1 # With simpleBuildEnvironment flag, we're already in the build directory # The source tree has been copied here by USM from sources/xz echo "Configuring XZ Utils 5.8.1..." # The configure script should be in the current directory # If not, check if we need to navigate to the source subdirectory if [ ! -f "./configure" ]; then if [ -d "sources/xz/xz" ]; then cd sources/xz/xz elif [ -d "xz/xz" ]; then cd xz/xz elif [ -d "xz" ]; then cd xz else echo "Error: configure script not found" echo "Contents of current directory:" ls -la exit 1 fi fi ./configure --prefix=${PREFIX} \ --disable-static \ --docdir=${PREFIX}/share/doc/xz-5.8.1 echo "Building XZ Utils 5.8.1..." make echo "Build complete."