install_raze.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/bin/ksh
  2. doas pkg_add cmake gmake ninja sdl2 zmusic openal bzip2 jpeg libvpx
  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=Raze
  36. repository=https://github.com/ZDoom/Raze.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. cmake .. -DNO_GTK=ON -DDYN_OPENAL=NO -DHAVE_STDINT_H=1 -DNO_OPENMP=ON -DNO_FMOD=ON
  63. gmake
  64. fi