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.

115 lines
5.8KB

  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. prep:
  17. apt-get update
  18. apt-get install -y freeglut3-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev \
  19. libxcursor-dev libavfilter-dev \
  20. libpng-dev libjpeg-dev libfreetype6-dev \
  21. libxrandr-dev libxinerama-dev libxi-dev \
  22. libgtk2.0-dev libsdl2-dev
  23. update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-10 40
  24. update-alternatives --install /usr/bin/cc cc /usr/bin/clang-10 40
  25. update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-10 40
  26. update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 40
  27. update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-10 40
  28. impl:
  29. make prep
  30. # static build
  31. pushd allegro5 && \
  32. cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/allegro5_static -DSHARED=off -DSTATIC=on -DWANT_FFMPEG=off -DWANT_TTF=on . && \
  33. make -j $$(nproc) && \
  34. make install && \
  35. cp -prv lib/pkgconfig/allegro* /usr/share/pkgconfig/
  36. ## shared build
  37. #pushd allegro5 && \
  38. #cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/allegro5_shared -DSHARED=on -DSTATIC=on -DWANT_FFMPEG=off -DWANT_TTF=on . && \
  39. #make -j $$(nproc) && \
  40. #sudo make install && \
  41. #sudo cp -prv lib/pkgconfig/allegro* /usr/share/pkgconfig/
  42. prep_sdl:
  43. make prep
  44. apt-get install -y libsdl2-dev
  45. impl_sdl:
  46. make prep_sdl
  47. # static build
  48. pushd allegro5 && \
  49. cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/allegro5_static -DALLEGRO_SDL=on -DSHARED=off -DSTATIC=on -DWANT_FFMPEG=off -DWANT_TTF=on . && \
  50. make -j $$(nproc) && \
  51. make install && \
  52. cp -prv lib/pkgconfig/allegro* /usr/share/pkgconfig/
  53. package-ubuntu1804:
  54. rm -rf out
  55. mkdir -p out/opt/cppse/build/allegro5/
  56. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5/
  57. # with one exception I'm relying on internals of allegro5 for one file..
  58. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5/include/allegro5/internal/aintern_bitmap.h
  59. # since above file also includes others, let's just sync the entire internal dir
  60. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5/include/allegro5/internal/
  61. # somewhere also platform became needed, let's pull those in as well
  62. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5/include/allegro5/platform/
  63. rm -rf allegro5_*_amd64.deb
  64. 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
  65. package_sdl-ubuntu1804:
  66. rm -rf out
  67. mkdir -p out/opt/cppse/build/allegro5sdl/
  68. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5sdl/
  69. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5sdl/include/allegro5/internal/aintern_bitmap.h
  70. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5sdl/include/allegro5/internal/
  71. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5sdl/include/allegro5/platform/
  72. rm -rf allegro5sdl_*_amd64.deb
  73. 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
  74. package-ubuntu2004:
  75. rm -rf out
  76. mkdir -p out/opt/cppse/build/allegro5/
  77. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5/
  78. # with one exception I'm relying on internals of allegro5 for one file..
  79. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5/include/allegro5/internal/aintern_bitmap.h
  80. # since above file also includes others, let's just sync the entire internal dir
  81. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5/include/allegro5/internal/
  82. # somewhere also platform became needed, let's pull those in as well
  83. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5/include/allegro5/platform/
  84. rm -rf allegro5_*_amd64.deb
  85. 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
  86. package_sdl-ubuntu2004:
  87. rm -rf out
  88. mkdir -p out/opt/cppse/build/allegro5sdl/
  89. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5sdl/
  90. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5sdl/include/allegro5/internal/aintern_bitmap.h
  91. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5sdl/include/allegro5/internal/
  92. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5sdl/include/allegro5/platform/
  93. rm -rf allegro5sdl_*_amd64.deb
  94. 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
  95. clean:
  96. rm -rf allegro5
  97. rm -rf out
  98. rm -rf allegro5*.deb
  99. rm -rf allegro5*.changes
  100. shell:
  101. FLAGS="-i --privileged" bash ../ubuntu1804.sh /bin/bash