install.sh 621 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. set -e
  3. build_dir=$1
  4. install_dir=$2
  5. install_type=$3
  6. # Change to the glibc build directory
  7. cd "${build_dir}/build"
  8. # Prevent warning about missing /etc/ld.so.conf
  9. # touch ${install_dir}/etc/ld.so.conf
  10. # Fix the Makefile to skip an outdated sanity check that fails with a modern Glibc configuration
  11. sed '/test-installation/s@$(PERL)@echo not running@' -i Makefile
  12. # Install the package
  13. echo "Installing glibc..."
  14. make DESTDIR="${install_dir}" install
  15. # Fix a hardcoded path to the executable loader in the ldd script
  16. sed '/RTLDLIST=/s@/usr@@g' -i "${install_dir}/usr/bin/ldd"
  17. echo "Installation complete."