build.sh 926 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. set -e
  3. # XZ Utils 5.8.1 build script
  4. # Configures and builds the package following LFS guidelines
  5. build_dir=$1
  6. # With simpleBuildEnvironment flag, we're already in the build directory
  7. # The source tree has been copied here by USM from sources/xz
  8. echo "Configuring XZ Utils 5.8.1..."
  9. # The configure script should be in the current directory
  10. # If not, check if we need to navigate to the source subdirectory
  11. if [ ! -f "./configure" ]; then
  12. if [ -d "sources/xz/xz" ]; then
  13. cd sources/xz/xz
  14. elif [ -d "xz/xz" ]; then
  15. cd xz/xz
  16. elif [ -d "xz" ]; then
  17. cd xz
  18. else
  19. echo "Error: configure script not found"
  20. echo "Contents of current directory:"
  21. ls -la
  22. exit 1
  23. fi
  24. fi
  25. ./configure --prefix=${PREFIX} \
  26. --disable-static \
  27. --docdir=${PREFIX}/share/doc/xz-5.8.1
  28. echo "Building XZ Utils 5.8.1..."
  29. make
  30. echo "Build complete."