Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

83 lines
3.8KB

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