#!/usr/bin/make -f # See debhelper(7) (uncomment to enable) # output every command that modifies files on the build system. # export DH_VERBOSE = 1 # see FEATURE AREAS in dpkg-buildflags(1) export DEB_BUILD_MAINT_OPTIONS = hardening=+all reproducible=+all # see ENVIRONMENT in dpkg-buildflags(1) # package maintainers to append LDFLAGS # Not needed on Bullseye and newer #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed include /usr/share/dpkg/architecture.mk # We manage active runtime via update-alternatives # We use a relative runtime path to allow Multi-Arch: same to work. # We disable absolute systemd unit files too since we install to the path. # Don't waste time building the SteamVR driver, we don't package it. # Tell the version, instead of letting it guess from Git. CONFIG_ARGS := -DXRT_HAVE_SYSTEM_CJSON=ON \ -DXRT_OPENXR_INSTALL_ACTIVE_RUNTIME=OFF \ -DXRT_VULKAN_ENABLE_VALIDATION=OFF \ -DBUILD_DOC=OFF \ -DXRT_OPENXR_INSTALL_ABSOLUTE_RUNTIME_PATH=OFF \ -DXRT_BUILD_DRIVER_OHMD=OFF \ -DXRT_INSTALL_ABSOLUTE_SYSTEMD_UNIT_FILES=OFF \ -DXRT_FEATURE_STEAMVR_PLUGIN=OFF \ -DGIT_DESC=$(DEB_VERSION) # Only building in service mode on Linux where systemd can give us socket activation ifeq (,$(findstring linux,$(DEB_HOST_ARCH_OS))) # Disable service elsewhere CONFIG_ARGS += -DXRT_FEATURE_SERVICE=OFF endif ifneq (,$(filter $(DEB_HOST_ARCH_CPU), i386)) export DEB_CFLAGS_MAINT_APPEND += -ffloat-store export DEB_CXXFLAGS_MAINT_APPEND += -ffloat-store endif %: dh $@ override_dh_auto_configure: dh_auto_configure -- $(CONFIG_ARGS) # Make the changelog usable here, and modify the dependency in systemd unit file. override_dh_install: ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS))) mkdir -p debian/tmp/usr/share/doc/monado cp doc/CHANGELOG.md debian/tmp/usr/share/doc/monado/changelog pandoc -f markdown -t html doc/CHANGELOG.md > debian/tmp/usr/share/doc/monado/changelog.html endif ifneq (,$(findstring linux,$(DEB_HOST_ARCH_OS))) sed -i "s/%N/monado/" debian/tmp/usr/lib/systemd/user/monado.service endif dh_install # Remove imgui config file if it's there. override_dh_auto_clean: -rm -f imgui.ini dh_auto_clean