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.

93 lines
3.7KB

  1. SHELL:=/bin/bash
  2. UBUNTU_VERSION ?= 2404
  3. CODENAME ?= noble
  4. VERSION:=2.5.0
  5. build: $(CODENAME)/cppse-sfml_$(VERSION)_amd64.deb
  6. $(CODENAME)/cppse-sfml_$(VERSION)_amd64.deb:
  7. mkdir -p $(CODENAME)
  8. make ubuntu$(UBUNTU_VERSION)
  9. ubuntu1804:
  10. git clone https://github.com/SFML/SFML.git
  11. pushd SFML && git checkout 2.5.x # && patch -p1 < ../patch.txt
  12. bash ../ubuntu1804.sh make impl
  13. make package-ubuntu1804
  14. ubuntu2004:
  15. git clone https://github.com/SFML/SFML.git
  16. pushd SFML && git checkout 2.5.x # && patch -p1 < ../patch.txt
  17. bash ../ubuntu2004.sh make impl
  18. make package-ubuntu2004
  19. bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  20. ubuntu2204:
  21. git clone https://github.com/SFML/SFML.git
  22. pushd SFML && git checkout 2.5.x # && patch -p1 < ../patch.txt
  23. bash ../ubuntu2204.sh make impl
  24. make package-ubuntu2204
  25. bash ../ubuntu2204.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  26. ubuntu$(UBUNTU_VERSION):
  27. git clone https://github.com/SFML/SFML.git
  28. pushd SFML && git checkout 2.5.x # && patch -p1 < ../patch.txt
  29. bash ../ubuntu$(UBUNTU_VERSION).sh make impl
  30. make package-ubuntu$(UBUNTU_VERSION)
  31. bash ../ubuntu$(UBUNTU_VERSION).sh chown $$(id -u):$$(id -g) . -R # fix permissions
  32. impl:
  33. # copy & paste from allegro5
  34. apt-get update
  35. apt-get install -y freeglut3-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev \
  36. libxcursor-dev libavfilter-dev \
  37. libpng-dev libjpeg-dev libfreetype6-dev \
  38. libxrandr-dev libxinerama-dev libxi-dev \
  39. libgtk2.0-dev
  40. # extra needed
  41. apt-get install -y libudev-dev libopenal-dev libflac-dev libvorbis-dev
  42. switch-to-latest-clang
  43. # static build
  44. pushd SFML && \
  45. cmake -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/sfml_static -DBUILD_SHARED_LIBS=false . && \
  46. make -j $$(nproc) && \
  47. make install
  48. package-ubuntu1804:
  49. rm -rf out
  50. mkdir -p out/opt/cppse/build/sfml/
  51. cp -prv SFML/sfml_static/* out/opt/cppse/build/sfml/
  52. rm -rf sfml_*_amd64.deb
  53. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:18.04 fpm -f -v 1.1 -s dir -t deb -n sfml --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "SFML - build dependency" --url "https://github.com/SFML/SFML.git" --deb-generate-changes -C /src/out
  54. package-ubuntu2004:
  55. rm -rf out
  56. mkdir -p out/opt/cppse/build/sfml/
  57. cp -prv SFML/sfml_static/* out/opt/cppse/build/sfml/
  58. rm -rf sfml_*_amd64.deb
  59. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:20.04 fpm -f -v 1.1 -s dir -t deb -n sfml --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "SFML - build dependency" --url "https://github.com/SFML/SFML.git" --deb-generate-changes -C /src/out
  60. package-ubuntu2204:
  61. rm -rf out
  62. mkdir -p out/opt/cppse/build/sfml/
  63. cp -prv SFML/sfml_static/* out/opt/cppse/build/sfml/
  64. rm -rf sfml_*_amd64.deb
  65. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:22.04 fpm -f -v 1.1.1 -s dir -t deb -n sfml --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "SFML - build dependency" --url "https://github.com/SFML/SFML.git" --deb-generate-changes -C /src/out
  66. package-ubuntu$(UBUNTU_VERSION):
  67. rm -rf out
  68. mkdir -p out/opt/cppse/build/sfml/
  69. cp -prv SFML/sfml_static/* out/opt/cppse/build/sfml/
  70. rm -rf $(CODENAME)/cppse-sfml_*_amd64.deb
  71. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:24.04 fpm -f -v $(VERSION) --iteration $(CODENAME) -s dir -t deb -n cppse-sfml --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "SFML - build dependency" --url "https://github.com/SFML/SFML.git" --deb-generate-changes -C /src/out
  72. cp -prv cppse-sfml_*_amd64.deb $(CODENAME)/
  73. clean:
  74. rm -rf SFML
  75. rm -rf out
  76. shell:
  77. FLAGS="-i --privileged" bash ../ubuntu$(UBUNTU_VERSION).sh /bin/bash