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.

111 lines
4.4KB

  1. SHELL:=/bin/bash
  2. UBUNTU_VERSION ?= 2404
  3. CODENAME ?= noble
  4. VERSION:=5.2.5.0
  5. build: $(CODENAME)/cppse-allegro5_$(VERSION)_amd64.deb $(CODENAME)/cppse-allegro5sdl_$(VERSION)_amd64.deb
  6. $(CODENAME)/cppse-allegro5_$(VERSION)_amd64.deb:
  7. mkdir -p $(CODENAME)
  8. make ubuntu$(UBUNTU_VERSION)
  9. $(CODENAME)/cppse-allegro5sdl_$(VERSION)_amd64.deb:
  10. echo handled by above target anyway
  11. bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  12. bash ../ubuntu2204.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  13. ubuntu$(UBUNTU_VERSION):
  14. git clone https://github.com/liballeg/allegro5.git || true
  15. pushd allegro5 && git checkout $(VERSION)
  16. bash ../ubuntu$(UBUNTU_VERSION).sh make impl
  17. make package-ubuntu$(UBUNTU_VERSION)
  18. bash ../ubuntu$(UBUNTU_VERSION).sh make impl_sdl
  19. make package_sdl-ubuntu$(UBUNTU_VERSION)
  20. bash ../ubuntu$(UBUNTU_VERSION).sh chown $$(id -u):$$(id -g) . -R # fix permissions
  21. prep:
  22. apt-get update
  23. apt-get install -y freeglut3-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev \
  24. libxcursor-dev libavfilter-dev \
  25. libpng-dev libjpeg-dev libfreetype6-dev \
  26. libxrandr-dev libxinerama-dev libxi-dev \
  27. libgtk2.0-dev libsdl2-dev
  28. switch-to-latest-clang
  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-ubuntu$(UBUNTU_VERSION):
  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 $(CODENAME)/cppse-allegro5_*_amd64.deb
  65. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:24.04 fpm -f -v $(VERSION) --iteration $(CODENAME) -s dir -t deb -n cppse-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. cp -prv cppse-allegro5_*_amd64.deb $(CODENAME)/
  67. package_sdl-ubuntu$(UBUNTU_VERSION):
  68. rm -rf out
  69. mkdir -p out/opt/cppse/build/allegro5sdl/
  70. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5sdl/
  71. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5sdl/include/allegro5/internal/aintern_bitmap.h
  72. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5sdl/include/allegro5/internal/
  73. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5sdl/include/allegro5/platform/
  74. rm -rf $(CODENAME)/cppse-allegro5sdl_*_amd64.deb
  75. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:24.04 fpm -f -v $(VERSION) --iteration $(CODENAME) -s dir -t deb -n cppse-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
  76. cp -prv cppse-allegro5sdl_*_amd64.deb $(CODENAME)/
  77. clean:
  78. rm -rf allegro5
  79. rm -rf out
  80. # rm -rf cppse-allegro5*.deb
  81. shell:
  82. FLAGS="-i --privileged" bash ../ubuntu2404.sh /bin/bash