File: rules

package info (click to toggle)
cataclysm-dda 0.E-3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 229,776 kB
  • sloc: cpp: 327,224; python: 4,966; makefile: 884; sh: 657; xml: 209; javascript: 83; perl: 37
file content (56 lines) | stat: -rwxr-xr-x 1,679 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
#!/usr/bin/make -f

#DH_VERBOSE = 1

include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/architecture.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

SDL_FLAGS = TILES=1 SOUND=1
CURSES_FLAGS =
COMMON_FLAGS = VERSION=$(DEB_VERSION_UPSTREAM) PREFIX=/usr ASTYLE=0 RELEASE=1 USE_XDG_DIR=1 LANGUAGES=all DEBUG_SYMBOLS=1 LINTJSON=0

# for building with ccache
#COMMON_FLAGS += CCACHE=1

%:
	dh $@

override_dh_auto_build-arch:
	dh_auto_build -- RUNTESTS=0 $(COMMON_FLAGS) $(CURSES_FLAGS)
	dh_auto_build -- RUNTESTS=0 $(COMMON_FLAGS) $(SDL_FLAGS)
	# generate icons
	for size in 16 32 64 128; do \
		mkdir -p debian/icons/hicolor/$${size}x$${size}/apps; \
		rsvg-convert -o debian/icons/hicolor/$${size}x$${size}/apps/cataclysm-dda.png -w $${size} data/xdg/cataclysm-dda.svg ; \
	done

override_dh_auto_build-indep:

override_dh_auto_install-arch:
	$(MAKE) install-bin DESTDIR=debian/tmp $(COMMON_FLAGS) $(CURSES_FLAGS)
	$(MAKE) install-bin DESTDIR=debian/tmp $(COMMON_FLAGS) $(SDL_FLAGS)

override_dh_auto_install-indep:
	$(MAKE) install-data DESTDIR=debian/tmp $(COMMON_FLAGS) $(SDL_FLAGS)

override_dh_auto_test-arch:
	# mipsel buildd runs out of memory while linking the test binary.
ifneq ($(DEB_HOST_ARCH), mipsel)
	# we need to pass build flags, otherwise some files are regenerated
	# and the binaries are relinked.
	LC_ALL=C.UTF-8 XDG_CONFIG_HOME=. $(MAKE) check RUNTESTS=1 $(COMMON_FLAGS)
endif

override_dh_auto_test-indep:

override_dh_install:
	dh_install -Xcataicon.ico -XLICENSE.txt -XLICENSE-OFL-Terminus-Font.txt -Xchangelog.txt

override_dh_clean:
	$(MAKE) clean distclean
	dh_clean

override_dh_installchangelogs:
	dh_installchangelogs data/changelog.txt