Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

116 lines
5.9KB

  1. SHELL:=/bin/bash
  2. ubuntu1804:
  3. git clone https://github.com/liballeg/allegro5.git
  4. pushd allegro5 && git checkout 5.2.5.0
  5. bash ../ubuntu1804.sh make impl
  6. make package-ubuntu1804
  7. bash ../ubuntu1804.sh make impl_sdl
  8. make package_sdl-ubuntu1804
  9. ubuntu2004:
  10. git clone https://github.com/liballeg/allegro5.git
  11. pushd allegro5 && git checkout 5.2.5.0
  12. bash ../ubuntu2004.sh make impl
  13. make package-ubuntu2004
  14. bash ../ubuntu2004.sh make impl_sdl
  15. make package_sdl-ubuntu2004
  16. bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  17. prep:
  18. apt-get update
  19. apt-get install -y freeglut3-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev \
  20. libxcursor-dev libavfilter-dev \
  21. libpng-dev libjpeg-dev libfreetype6-dev \
  22. libxrandr-dev libxinerama-dev libxi-dev \
  23. libgtk2.0-dev libsdl2-dev
  24. update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
  25. update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
  26. update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
  27. update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
  28. update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40
  29. impl:
  30. make prep
  31. # static build
  32. pushd allegro5 && \
  33. cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/allegro5_static -DSHARED=off -DSTATIC=on -DWANT_FFMPEG=off -DWANT_TTF=on . && \
  34. make -j $$(nproc) && \
  35. make install && \
  36. cp -prv lib/pkgconfig/allegro* /usr/share/pkgconfig/
  37. ## shared build
  38. #pushd allegro5 && \
  39. #cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/allegro5_shared -DSHARED=on -DSTATIC=on -DWANT_FFMPEG=off -DWANT_TTF=on . && \
  40. #make -j $$(nproc) && \
  41. #sudo make install && \
  42. #sudo cp -prv lib/pkgconfig/allegro* /usr/share/pkgconfig/
  43. prep_sdl:
  44. make prep
  45. apt-get install -y libsdl2-dev
  46. impl_sdl:
  47. make prep_sdl
  48. # static build
  49. pushd allegro5 && \
  50. cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/allegro5_static -DALLEGRO_SDL=on -DSHARED=off -DSTATIC=on -DWANT_FFMPEG=off -DWANT_TTF=on . && \
  51. make -j $$(nproc) && \
  52. make install && \
  53. cp -prv lib/pkgconfig/allegro* /usr/share/pkgconfig/
  54. package-ubuntu1804:
  55. rm -rf out
  56. mkdir -p out/opt/cppse/build/allegro5/
  57. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5/
  58. # with one exception I'm relying on internals of allegro5 for one file..
  59. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5/include/allegro5/internal/aintern_bitmap.h
  60. # since above file also includes others, let's just sync the entire internal dir
  61. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5/include/allegro5/internal/
  62. # somewhere also platform became needed, let's pull those in as well
  63. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5/include/allegro5/platform/
  64. rm -rf allegro5_*_amd64.deb
  65. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:18.04 fpm -v 1.1 -s dir -t deb -n allegro5 --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "allegro5 - build dependency" --url "https://github.com/liballeg/allegro5.git" --deb-generate-changes -C /src/out
  66. package_sdl-ubuntu1804:
  67. rm -rf out
  68. mkdir -p out/opt/cppse/build/allegro5sdl/
  69. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5sdl/
  70. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5sdl/include/allegro5/internal/aintern_bitmap.h
  71. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5sdl/include/allegro5/internal/
  72. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5sdl/include/allegro5/platform/
  73. rm -rf allegro5sdl_*_amd64.deb
  74. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:18.04 fpm -v 1.1 -s dir -t deb -n allegro5sdl --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "allegro5 - SDL version - build dependency" --url "https://github.com/liballeg/allegro5.git" --deb-generate-changes -C /src/out
  75. package-ubuntu2004:
  76. rm -rf out
  77. mkdir -p out/opt/cppse/build/allegro5/
  78. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5/
  79. # with one exception I'm relying on internals of allegro5 for one file..
  80. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5/include/allegro5/internal/aintern_bitmap.h
  81. # since above file also includes others, let's just sync the entire internal dir
  82. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5/include/allegro5/internal/
  83. # somewhere also platform became needed, let's pull those in as well
  84. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5/include/allegro5/platform/
  85. rm -rf allegro5_*_amd64.deb
  86. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:20.04 fpm -v 1.1 -s dir -t deb -n allegro5 --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "allegro5 - build dependency" --url "https://github.com/liballeg/allegro5.git" --deb-generate-changes -C /src/out
  87. package_sdl-ubuntu2004:
  88. rm -rf out
  89. mkdir -p out/opt/cppse/build/allegro5sdl/
  90. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5sdl/
  91. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5sdl/include/allegro5/internal/aintern_bitmap.h
  92. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5sdl/include/allegro5/internal/
  93. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5sdl/include/allegro5/platform/
  94. rm -rf allegro5sdl_*_amd64.deb
  95. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:20.04 fpm -v 1.1 -s dir -t deb -n allegro5sdl --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "allegro5 - SDL version - build dependency" --url "https://github.com/liballeg/allegro5.git" --deb-generate-changes -C /src/out
  96. clean:
  97. rm -rf allegro5
  98. rm -rf out
  99. rm -rf allegro5*.deb
  100. rm -rf allegro5*.changes
  101. shell:
  102. FLAGS="-i --privileged" bash ../ubuntu1804.sh /bin/bash