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.

45 lines
1.5KB

  1. SHELL:=/bin/bash
  2. UBUNTU_VERSION ?= 2404
  3. CODENAME ?= noble
  4. VERSION:=2.0
  5. build: $(CODENAME)/cppse-tvision_$(VERSION)_amd64.deb
  6. $(CODENAME)/cppse-tvision_$(VERSION)_amd64.deb:
  7. mkdir -p $(CODENAME)
  8. make ubuntu$(UBUNTU_VERSION)
  9. ubuntu$(UBUNTU_VERSION):
  10. # check out revision that is master at the time of writing
  11. git clone https://github.com/magiblot/tvision || true
  12. pushd tvision && \
  13. git checkout 8605384659274edf1db39abef5338d2573c3e0b6 && \
  14. popd && \
  15. bash ../ubuntu$(UBUNTU_VERSION).sh make impl
  16. make package-ubuntu$(UBUNTU_VERSION)
  17. impl:
  18. pushd tvision && \
  19. cmake . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$$PWD/../tvision_out && \
  20. cmake --build ./build && \
  21. pushd build && \
  22. make install
  23. chown 997:997 tvision -R # workaround for not using non-root user for building
  24. package-ubuntu$(UBUNTU_VERSION):
  25. rm -rf out
  26. mkdir -p out/opt/cppse/build/tvision
  27. cp -prv tvision_out/* out/opt/cppse/build/tvision/
  28. rm -rf $(CODENAME)/cppse-tvision_*_amd64.deb
  29. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:24.04 fpm -f -v $(VERSION) --iteration $(CODENAME) -s dir -t deb -n cppse-tvision --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "tvision - build dependency" --url "https://github.com/magiblot/tvision" --deb-generate-changes -C /src/out
  30. cp -prv cppse-tvision_*_amd64.deb $(CODENAME)/
  31. clean:
  32. sudo rm -rf tvision*
  33. sudo rm -rf out
  34. shell:
  35. FLAGS="-i --privileged" bash ../ubuntu$(UBUNTU_VERSION).sh /bin/bash