Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

80 rindas
3.0KB

  1. SHELL:=/bin/bash
  2. VERSION:=3.0.1
  3. build: cppse-vivid_$(VERSION)_amd64.deb
  4. cppse-vivid_$(VERSION)_amd64.deb:
  5. make ubuntu2404
  6. ubuntu2204:
  7. git clone -b v3.0.1 https://github.com/gurki/vivid
  8. bash ../ubuntu2204.sh make impl
  9. bash ../ubuntu2204.sh make impl-emscripten
  10. make package-ubuntu2204
  11. bash ../ubuntu2204.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  12. ubuntu2404:
  13. git clone -b v3.0.1 https://github.com/gurki/vivid
  14. bash ../ubuntu2404.sh make impl
  15. bash ../ubuntu2404.sh make impl-emscripten
  16. make package-ubuntu2404
  17. bash ../ubuntu2404.sh chown $$(id -u):$$(id -g) . -R # fix permissions
  18. impl:
  19. git config --global --add safe.directory '*'
  20. switch-to-latest-clang
  21. # patch away issue of adding tests, currently catch is broken in clang 14.
  22. cat vivid/CMakeLists.txt | head -n -1 > vivid/CMakeLists.txt.new
  23. mv vivid/CMakeLists.txt.new vivid/CMakeLists.txt
  24. # build without tests for now
  25. mkdir -p vivid_out && \
  26. pushd vivid && \
  27. mkdir -p build && \
  28. pushd build && \
  29. cmake -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/../vivid_out .. && \
  30. make -j $$(nproc) && \
  31. make install
  32. impl-emscripten:
  33. git config --global --add safe.directory '*'
  34. switch-to-latest-clang
  35. # patch away issue of adding tests, currently catch is broken in clang 14.
  36. cat vivid/CMakeLists.txt | head -n -1 > vivid/CMakeLists.txt.new
  37. mv vivid/CMakeLists.txt.new vivid/CMakeLists.txt
  38. # build without tests for now
  39. mkdir -p vivid_out && \
  40. pushd vivid && \
  41. mkdir -p build2 && \
  42. pushd build2 && \
  43. CXX=/emsdk/upstream/emscripten/em++ cmake -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=$$PWD/../vivid_out2 .. && \
  44. make -j $$(nproc) && \
  45. make install
  46. package-ubuntu2204:
  47. rm -rf out
  48. mkdir -p out/opt/cppse/build/vivid/
  49. cp -prv vivid/vivid_out/* out/opt/cppse/build/vivid/
  50. # emscripten version
  51. cp -prv vivid/vivid_out2/lib/libvivid.a out/opt/cppse/build/vivid/lib/libvivid-em.a
  52. cp -prv vivid/build/_deps/glm-src/glm out/opt/cppse/build/vivid/include/
  53. rm -rf vivid_*_amd64.deb
  54. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:22.04 fpm -v 1.1.1 -s dir -t deb -n vivid --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "vivid - build dependency" --url "https://github.com/gurki/vivid.git" --deb-generate-changes -C /src/out
  55. package-ubuntu2404:
  56. rm -rf out
  57. mkdir -p out/opt/cppse/build/vivid/
  58. cp -prv vivid/vivid_out/* out/opt/cppse/build/vivid/
  59. # emscripten version
  60. cp -prv vivid/vivid_out2/lib/libvivid.a out/opt/cppse/build/vivid/lib/libvivid-em.a
  61. cp -prv vivid/build/_deps/glm-src/glm out/opt/cppse/build/vivid/include/
  62. rm -rf vivid_*_amd64.deb
  63. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:24.04 fpm -v $(VERSION) -s dir -t deb -n cppse-vivid --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "vivid - build dependency" --url "https://github.com/gurki/vivid.git" --deb-generate-changes -C /src/out
  64. clean:
  65. rm -rf vivid
  66. rm -rf out
  67. shell:
  68. FLAGS="-i --privileged" bash ../ubuntu2204.sh /bin/bash