File: rules

package info (click to toggle)
colobot 0.1.12-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 416,348 kB
  • sloc: cpp: 138,659; ansic: 3,063; python: 2,115; sh: 205; awk: 91; xml: 32; makefile: 31
file content (46 lines) | stat: -rwxr-xr-x 1,397 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

# Hippomocks doesn't support some Debian architectures
HIPPOMOCKS_BROKEN_ARCHS=armel armhf arm64 mips mips64el mipsel

include /usr/share/dpkg/architecture.mk

CBOT_CONFIGURE=-DMUSIC:BOOL=False
# Only encode the music files if needed
ifneq (,$(findstring colobot-common-sounds, $(shell dh_listpackages)))
CBOT_CONFIGURE=-DMUSIC:BOOL=True -DMUSIC_FLAC:BOOL=True
endif

ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(HIPPOMOCKS_BROKEN_ARCHS)))
CBOT_CONFIGURE+=-DTESTS:BOOL=False
else
CBOT_CONFIGURE+=-DTESTS:BOOL=True
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" \
	                     -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=OFF \
	                     -DOFFICIAL_COLOBOT_BUILD:BOOL=True \
	                     -DINSTALL_DOCS:BOOL=True \
	                     ${CBOT_CONFIGURE} \
	                     -DPYTHON_EXECUTABLE=/usr/bin/python3 \
	                     -DOPENAL_SOUND:BOOL=True \
	                     -DCMAKE_VERBOSE_MAKEFILE=True

override_dh_auto_build-arch:
	dh_auto_build -a

override_dh_auto_build-indep:
	dh_auto_build -i -- doc

ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(HIPPOMOCKS_BROKEN_ARCHS)))
override_dh_auto_test-arch:
	# Allow the tests to fail on that architecture, see #843690
	- dh_auto_test -a
endif

# Skip tests in arch:all build
override_dh_auto_test-indep: