SHELL:=/bin/bash UBUNTU_VERSION ?= 2404 CODENAME ?= noble VERSION:=1.0.0 build: $(CODENAME)/cppse-inotify-cpp_$(VERSION)_amd64.deb $(CODENAME)/cppse-inotify-cpp_$(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/erikzenker/inotify-cpp || true pushd inotify-cpp && \ git checkout 1a4413637a08f6303526a2be140806f5abaaffd5 && \ popd && \ bash ../ubuntu$(UBUNTU_VERSION).sh make impl make package-ubuntu$(UBUNTU_VERSION) impl: dpkg -i ../boost/cppse-boost_*.deb pushd inotify-cpp && \ cmake -DCMAKE_INSTALL_PREFIX=$$PWD/../inotify-cpp_out -DBUILD_EXAMPLE=OFF -DBUILD_TEST=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON -DUSE_BOOST_FILESYSTEM=OFF -DBoost_USE_STATIC_LIBS=ON -DBOOST_ROOT="/opt/cppse/build/boost/" -DBoost_INCLUDE_DIR="/opt/cppse/build/boost/include" . && \ make -j8 && \ make install package-ubuntu$(UBUNTU_VERSION): rm -rf out mkdir -p out/opt/cppse/build/inotify-cpp cp -prv inotify-cpp_out/* out/opt/cppse/build/inotify-cpp/ rm -rf $(CODENAME)/cppse-inotify-cpp_*_amd64.deb docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:24.04 fpm -f -v $(VERSION) --iteration $(CODENAME) -s dir -t deb -n cppse-inotify-cpp --license MPL2 --maintainer "Ray Burgemeestre " --description "inotify-cpp - build dependency" --url "https://github.com/erikzenker/inotify-cpp" --deb-generate-changes -C /src/out cp -prv cppse-inotify-cpp_*_amd64.deb $(CODENAME)/ clean: sudo rm -rf inotify-cpp* sudo rm -rf out shell: FLAGS="-i --privileged" bash ../ubuntu$(UBUNTU_VERSION).sh /bin/bash