You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

183 lines
10.0KB

  1. SHELL:=/bin/bash
  2. VERSION:=5.2.5.0
  3. build: cppse-allegro5_$(VERSION)_amd64.deb
  4. cppse-allegro5_$(VERSION)_amd64.deb:
  5. make ubuntu2404
  6. ubuntu1804:
  7. git clone https://github.com/liballeg/allegro5.git
  8. pushd allegro5 && git checkout 5.2.5.0
  9. bash ../ubuntu1804.sh make impl
  10. make package-ubuntu1804
  11. bash ../ubuntu1804.sh make impl_sdl
  12. make package_sdl-ubuntu1804
  13. ubuntu2004:
  14. git clone https://github.com/liballeg/allegro5.git
  15. pushd allegro5 && git checkout 5.2.5.0
  16. bash ../ubuntu2004.sh make impl
  17. make package-ubuntu2004
  18. bash ../ubuntu2004.sh make impl_sdl
  19. make package_sdl-ubuntu2004
  20. bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  21. ubuntu2204:
  22. git clone https://github.com/liballeg/allegro5.git
  23. pushd allegro5 && git checkout 5.2.5.0
  24. bash ../ubuntu2204.sh make impl
  25. make package-ubuntu2204
  26. bash ../ubuntu2204.sh make impl_sdl
  27. make package_sdl-ubuntu2204
  28. bash ../ubuntu2204.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  29. ubuntu2404:
  30. git clone https://github.com/liballeg/allegro5.git || true
  31. pushd allegro5 && git checkout $(VERSION)
  32. bash ../ubuntu2404.sh make impl
  33. make package-ubuntu2404
  34. bash ../ubuntu2404.sh make impl_sdl
  35. make package_sdl-ubuntu2404
  36. bash ../ubuntu2404.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  37. prep:
  38. apt-get update
  39. apt-get install -y freeglut3-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev \
  40. libxcursor-dev libavfilter-dev \
  41. libpng-dev libjpeg-dev libfreetype6-dev \
  42. libxrandr-dev libxinerama-dev libxi-dev \
  43. libgtk2.0-dev libsdl2-dev
  44. switch-to-latest-clang
  45. impl:
  46. make prep
  47. # static build
  48. pushd allegro5 && \
  49. cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/allegro5_static -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. ## shared build
  54. #pushd allegro5 && \
  55. #cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/allegro5_shared -DSHARED=on -DSTATIC=on -DWANT_FFMPEG=off -DWANT_TTF=on . && \
  56. #make -j $$(nproc) && \
  57. #sudo make install && \
  58. #sudo cp -prv lib/pkgconfig/allegro* /usr/share/pkgconfig/
  59. prep_sdl:
  60. make prep
  61. apt-get install -y libsdl2-dev
  62. impl_sdl:
  63. make prep_sdl
  64. # static build
  65. pushd allegro5 && \
  66. cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/allegro5_static -DALLEGRO_SDL=on -DSHARED=off -DSTATIC=on -DWANT_FFMPEG=off -DWANT_TTF=on . && \
  67. make -j $$(nproc) && \
  68. make install && \
  69. cp -prv lib/pkgconfig/allegro* /usr/share/pkgconfig/
  70. package-ubuntu1804:
  71. rm -rf out
  72. mkdir -p out/opt/cppse/build/allegro5/
  73. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5/
  74. # with one exception I'm relying on internals of allegro5 for one file..
  75. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5/include/allegro5/internal/aintern_bitmap.h
  76. # since above file also includes others, let's just sync the entire internal dir
  77. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5/include/allegro5/internal/
  78. # somewhere also platform became needed, let's pull those in as well
  79. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5/include/allegro5/platform/
  80. rm -rf allegro5_*_amd64.deb
  81. 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
  82. package_sdl-ubuntu1804:
  83. rm -rf out
  84. mkdir -p out/opt/cppse/build/allegro5sdl/
  85. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5sdl/
  86. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5sdl/include/allegro5/internal/aintern_bitmap.h
  87. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5sdl/include/allegro5/internal/
  88. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5sdl/include/allegro5/platform/
  89. rm -rf allegro5sdl_*_amd64.deb
  90. 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
  91. package-ubuntu2004:
  92. rm -rf out
  93. mkdir -p out/opt/cppse/build/allegro5/
  94. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5/
  95. # with one exception I'm relying on internals of allegro5 for one file..
  96. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5/include/allegro5/internal/aintern_bitmap.h
  97. # since above file also includes others, let's just sync the entire internal dir
  98. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5/include/allegro5/internal/
  99. # somewhere also platform became needed, let's pull those in as well
  100. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5/include/allegro5/platform/
  101. rm -rf allegro5_*_amd64.deb
  102. 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
  103. package-ubuntu2204:
  104. rm -rf out
  105. mkdir -p out/opt/cppse/build/allegro5/
  106. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5/
  107. # with one exception I'm relying on internals of allegro5 for one file..
  108. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5/include/allegro5/internal/aintern_bitmap.h
  109. # since above file also includes others, let's just sync the entire internal dir
  110. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5/include/allegro5/internal/
  111. # somewhere also platform became needed, let's pull those in as well
  112. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5/include/allegro5/platform/
  113. rm -rf allegro5_*_amd64.deb
  114. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:22.04 fpm -v 1.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
  115. package-ubuntu2404:
  116. rm -rf out
  117. mkdir -p out/opt/cppse/build/allegro5/
  118. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5/
  119. # with one exception I'm relying on internals of allegro5 for one file..
  120. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5/include/allegro5/internal/aintern_bitmap.h
  121. # since above file also includes others, let's just sync the entire internal dir
  122. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5/include/allegro5/internal/
  123. # somewhere also platform became needed, let's pull those in as well
  124. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5/include/allegro5/platform/
  125. rm -rf cppse-allegro5_*_amd64.deb
  126. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:24.04 fpm -v $(VERSION) -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
  127. package_sdl-ubuntu2004:
  128. rm -rf out
  129. mkdir -p out/opt/cppse/build/allegro5sdl/
  130. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5sdl/
  131. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5sdl/include/allegro5/internal/aintern_bitmap.h
  132. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5sdl/include/allegro5/internal/
  133. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5sdl/include/allegro5/platform/
  134. rm -rf allegro5sdl_*_amd64.deb
  135. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:20.04 fpm -v 1.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
  136. package_sdl-ubuntu2204:
  137. rm -rf out
  138. mkdir -p out/opt/cppse/build/allegro5sdl/
  139. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5sdl/
  140. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5sdl/include/allegro5/internal/aintern_bitmap.h
  141. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5sdl/include/allegro5/internal/
  142. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5sdl/include/allegro5/platform/
  143. rm -rf allegro5sdl_*_amd64.deb
  144. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:22.04 fpm -v 1.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
  145. package_sdl-ubuntu2404:
  146. rm -rf out
  147. mkdir -p out/opt/cppse/build/allegro5sdl/
  148. cp -prv allegro5/allegro5_static/* out/opt/cppse/build/allegro5sdl/
  149. cp -prv allegro5/include/allegro5/internal/aintern_bitmap.h out/opt/cppse/build/allegro5sdl/include/allegro5/internal/aintern_bitmap.h
  150. cp -prv allegro5/include/allegro5/internal/* out/opt/cppse/build/allegro5sdl/include/allegro5/internal/
  151. cp -prv allegro5/include/allegro5/platform/* out/opt/cppse/build/allegro5sdl/include/allegro5/platform/
  152. rm -rf allegro5sdl_*_amd64.deb
  153. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:22.04 fpm -v 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
  154. clean:
  155. rm -rf allegro5
  156. rm -rf out
  157. rm -rf allegro5*.deb
  158. rm -rf allegro5*.changes
  159. rm -rf cppse-allegro5*.deb
  160. shell:
  161. FLAGS="-i --privileged" bash ../ubuntu1804.sh /bin/bash