install.sh 1007 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. set -e
  3. # With simpleBuildEnvironment flag, we're already in build directory
  4. # which contains the built source tree
  5. build_dir=$1
  6. install_dir=$2
  7. install_type=$3
  8. # Change to unix subdirectory for installation
  9. cd sources/unix
  10. # Install the package
  11. make install DESTDIR=${install_dir}
  12. # Make the installed library writable so debugging symbols can be removed later
  13. # Find the actual library location (lib or lib64)
  14. LIB_PATH=$(find ${install_dir}${PREFIX} -name "libtcl8.6.so" -type f | head -1)
  15. chmod -v u+w ${LIB_PATH}
  16. # Install TCL's headers (required by next package, Expect)
  17. make install-private-headers DESTDIR=${install_dir}
  18. # Create necessary symbolic link
  19. mkdir -p ${install_dir}${BINDIR}
  20. ln -sfv ${install_dir}${BINDIR}/tclsh8.6 ${install_dir}${BINDIR}/tclsh8.6
  21. ln -sfv tclsh8.6 ${install_dir}${BINDIR}/tclsh
  22. # Rename a man page that conflicts with a Perl man page
  23. mv ${install_dir}${PREFIX}/share/man/man3/{Thread,Tcl_Thread}.3
  24. echo "TCL 8.6.16 installation completed successfully."