File: rules

package info (click to toggle)
monado 21.0.0~dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 9,972 kB
  • sloc: cpp: 75,052; ansic: 62,517; python: 862; java: 635; xml: 503; sh: 209; makefile: 54
file content (59 lines) | stat: -rwxr-xr-x 2,004 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/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

%:
	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
	markdown 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