install_gzdoom.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #!/bin/ksh
  2. doas pkg_add cmake gmake ninja sdl2 openal bzip2 jpeg libvpx zmusic
  3. #application=ZMusic
  4. #repository=https://github.com/coelckers/ZMusic.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. #
  27. #if [ "$compile" = "true" ]; then
  28. # cd ~/src/$application || return
  29. # mkdir -pv build
  30. # cd build || return
  31. # cmake -DCMAKE_BUILD_TYPE=Release ..
  32. # cmake --build .
  33. # doas gmake install
  34. #fi
  35. application=gzdoom
  36. repository=https://github.com/coelckers/gzdoom.git
  37. export compile=
  38. mkdir -p ~/src
  39. cd ~/src || return
  40. if [ ! -d $application ]; then
  41. git clone $repository
  42. cd $application || return
  43. export compile=true
  44. else
  45. cd $application || return
  46. #git pull
  47. pwd
  48. git fetch
  49. LOCAL=$(git rev-parse HEAD)
  50. REMOTE=$(git rev-parse @{u})
  51. if [ ! $LOCAL = $REMOTE ]; then
  52. pwd
  53. echo "Need to pull"
  54. git pull
  55. export compile=true
  56. fi
  57. fi
  58. if [ "$compile" = "true" ]; then
  59. cd ~/src/$application || return
  60. mkdir -p build
  61. cd build || return
  62. wget -nc http://zdoom.org/files/fmod/fmodapi44464linux.tar.gz &&
  63. tar -xvzf fmodapi44464linux.tar.gz -C .
  64. cmake .. -DNO_FMOD=ON
  65. gmake
  66. fi