SHELL:=/bin/bash UBUNTU_VERSION ?= 2404 CODENAME ?= noble VERSION:=2.0 build: $(CODENAME)/cppse-tvision_$(VERSION)_amd64.deb $(CODENAME)/cppse-tvision_$(VERSION)_amd64.deb: mkdir -p $(CODENAME) make ubuntu$(UBUNTU_VERSION) ubuntu$(UBUNTU_VERSION): # check out revision that is master at the time of writing git clone https://github.com/magiblot/tvision || true pushd tvision && \ git checkout 8605384659274edf1db39abef5338d2573c3e0b6 && \ popd && \ bash ../ubuntu$(UBUNTU_VERSION).sh make impl make package-ubuntu$(UBUNTU_VERSION) impl: pushd tvision && \ cmake . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$$PWD/../tvision_out && \ cmake --build ./build && \ pushd build && \ make install chown 997:997 tvision -R # workaround for not using non-root user for building package-ubuntu$(UBUNTU_VERSION): rm -rf out mkdir -p out/opt/cppse/build/tvision cp -prv tvision_out/* out/opt/cppse/build/tvision/ rm -rf $(CODENAME)/cppse-tvision_*_amd64.deb 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 " --description "tvision - build dependency" --url "https://github.com/magiblot/tvision" --deb-generate-changes -C /src/out cp -prv cppse-tvision_*_amd64.deb $(CODENAME)/ clean: sudo rm -rf tvision* sudo rm -rf out shell: FLAGS="-i --privileged" bash ../ubuntu$(UBUNTU_VERSION).sh /bin/bash