install_frogcomposband.ksh 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/ksh
  2. doas pkg_add automake-1.16.5 autoconf-2.71 gcc-11.2.0p9 gmake
  3. application=frogcomposband
  4. repository=https://github.com/sulkasormi/frogcomposband.git
  5. export compile=
  6. mkdir -p ~/src
  7. cd ~/src || return
  8. if [ ! -d $application ]; then
  9. git clone $repository
  10. cd $application || return
  11. export compile=true
  12. else
  13. cd $application || return
  14. #git pull
  15. pwd
  16. git fetch
  17. LOCAL=$(git rev-parse HEAD)
  18. REMOTE=$(git rev-parse @{u})
  19. if [ ! $LOCAL = $REMOTE ]; then
  20. pwd
  21. echo "Need to pull"
  22. git pull
  23. export compile=true
  24. fi
  25. fi
  26. if [ "$compile" = "true" ]; then
  27. cd ~/src/$application || return
  28. echo ""
  29. echo "NOTE: If getting a 'Provide an AUTOMAKE_VERSION environment variable, please' error do this:"
  30. echo "$ export AUTOMAKE_VERSION=1.16 # <- (version without minor number 1.16.5 > 1.16)"
  31. echo "$ export AUTOCONF_VERSION=2.71 # <- (version without minor number 2.71p3 > 2.71)"
  32. echo ""
  33. export AUTOMAKE_VERSION=1.16
  34. export AUTOCONF_VERSION=2.71
  35. sh autogen.sh
  36. chmod +x configure
  37. ./configure --prefix "$HOME"/.frogcomposband --with-ncurses-prefix=/usr --without-x --with-no-install CFLAGS="-DSGI -DULTRIX" LIBS=-lncurses
  38. sed -ie 's/timeb.h/time.h/g' src/h-system.h
  39. gmake clean
  40. gmake
  41. fi