File: rules

package info (click to toggle)
endless-sky 0.10.16-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 414,608 kB
  • sloc: cpp: 73,435; python: 893; xml: 666; sh: 271; makefile: 28
file content (39 lines) | stat: -rwxr-xr-x 950 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow

%:
	dh $@ --buildsystem=cmake+ninja

# avoid downloading external libraries with git
O += -D ES_USE_VCPKG=0

# release build includes installation of the endless-sky binary
O += -D CMAKE_BUILD_TYPE=Release

override_dh_auto_configure:
	dh_auto_configure --buildsystem=cmake+ninja -- $O

execute_after_dh_auto_install:
	rm -f debian/tmp/usr/share/doc/endless-sky/license.txt

ctest_env = \
	CTEST_OUTPUT_ON_FAILURE=1 \
	SDL_VIDEODRIVER=offscreen \
	$(NULL)
ctest_options = \
	--label-exclude "(benchmark|integration-debug)" \
	--timeout 9000 \
	$(NULL)
ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
ctest_options += --verbose
endif

override_dh_auto_test:
ifneq ($(shell dpkg-architecture -q DEB_BUILD_ARCH),riscv64)
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	env -C obj-$(shell dpkg-architecture -q DEB_BUILD_GNU_TYPE) \
		$(ctest_env) \
		ctest $(ctest_options)
endif
endif