File: rules

package info (click to toggle)
vulkan-loader 1.3.239.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 26,752 kB
  • sloc: ansic: 228,516; cpp: 24,431; xml: 24,128; python: 5,502; asm: 2,525; sh: 122; makefile: 62
file content (57 lines) | stat: -rwxr-xr-x 1,771 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
#!/usr/bin/make -f

# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
include /usr/share/dpkg/pkg-info.mk

%:
	dh $@ --builddirectory=build/

override_dh_clean:
	dh_clean
	rm -rf __pycache__ \
		include \
		scripts/__pycache__ \
		vulkan-headers/registry/__pycache__
	rm -f external/googletest

override_dh_auto_configure:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	ln -s /usr/src/googletest external
endif

	dh_auto_configure --sourcedirectory=vulkan-headers --builddirectory=build-vulkan-headers/
	dh_auto_build --sourcedirectory=vulkan-headers --builddirectory=build-vulkan-headers/
	dh_auto_install --sourcedirectory=vulkan-headers --builddirectory=build-vulkan-headers/ --destdir=debian/tmp-vulkan-headers

	dh_auto_configure -- \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
	-DBUILD_WSI_MIR_SUPPORT=OFF \
	-DVulkanHeaders_DIR=debian/tmp-vulkan-headers/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/VulkanHeaders/

override_dh_auto_build:
	dh_auto_build -- VulkanLoader_generated_source
	dh_auto_build

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	(cd build; tests/run_all_tests.sh || \
		echo "NOTE: 23 tests expected to fail without a vulkan driver")
endif

override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp

	cp -rp debian/tmp-vulkan-headers/usr debian/tmp/
	rm -rf debian/tmp/usr/share/vulkan/registry/__pycache__
	rm -rf debian/tmp/usr/share/vulkan/registry/spec_tools/__pycache__

override_dh_missing:
	dh_missing --fail-missing

gentarball:
	tar --transform 's,^,$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)/,' \
		--exclude 'debian' --exclude-vcs \
		-cJf ../$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz .