2020-03-18 15:09:04 +00:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# See debhelper(7) (uncomment to enable)
|
|
|
|
# output every command that modifies files on the build system.
|
2021-02-23 19:31:08 +00:00
|
|
|
# export DH_VERBOSE = 1
|
2020-03-18 15:09:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
# 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
|
2021-10-27 15:20:16 +00:00
|
|
|
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
2020-03-18 15:09:04 +00:00
|
|
|
|
2021-02-23 19:31:08 +00:00
|
|
|
include /usr/share/dpkg/architecture.mk
|
2020-03-18 15:09:04 +00:00
|
|
|
|
|
|
|
# We manage active runtime via update-alternatives
|
|
|
|
# We use a relative runtime path to allow Multi-Arch: same to work.
|
2021-02-23 19:31:08 +00:00
|
|
|
# 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 \
|
2020-05-12 17:46:00 +00:00
|
|
|
-DXRT_OPENXR_INSTALL_ACTIVE_RUNTIME=OFF \
|
|
|
|
-DXRT_VULKAN_ENABLE_VALIDATION=OFF \
|
|
|
|
-DBUILD_DOC=OFF \
|
|
|
|
-DXRT_OPENXR_INSTALL_ABSOLUTE_RUNTIME_PATH=OFF \
|
2021-02-23 19:31:08 +00:00
|
|
|
-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
|
2020-03-18 15:09:04 +00:00
|
|
|
|
2021-02-23 19:31:08 +00:00
|
|
|
%:
|
|
|
|
dh $@
|
|
|
|
|
|
|
|
override_dh_auto_configure:
|
|
|
|
dh_auto_configure -- $(CONFIG_ARGS)
|
|
|
|
|
|
|
|
# Make the changelog usable here, and modify the dependency in systemd unit file.
|
2020-07-10 22:50:49 +00:00
|
|
|
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
|
2021-10-26 22:09:18 +00:00
|
|
|
pandoc -f markdown -t html doc/CHANGELOG.md > debian/tmp/usr/share/doc/monado/changelog.html
|
2021-02-23 19:31:08 +00:00
|
|
|
endif
|
|
|
|
ifneq (,$(findstring linux,$(DEB_HOST_ARCH_OS)))
|
|
|
|
sed -i "s/%N/monado/" debian/tmp/usr/lib/systemd/user/monado.service
|
2020-07-10 22:50:49 +00:00
|
|
|
endif
|
|
|
|
dh_install
|
|
|
|
|
2020-03-18 15:09:04 +00:00
|
|
|
# Remove imgui config file if it's there.
|
|
|
|
override_dh_auto_clean:
|
|
|
|
-rm -f imgui.ini
|
|
|
|
dh_auto_clean
|