File: rules

package info (click to toggle)
cataclysm-dda 0.C+git20190228.faafa3a-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 181,636 kB
  • sloc: cpp: 256,609; python: 2,621; makefile: 862; sh: 495; perl: 37; xml: 33
file content (45 lines) | stat: -rwxr-xr-x 1,272 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
#!/usr/bin/make -f

#DH_VERBOSE = 1

include /usr/share/dpkg/pkg-info.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 LUA=1 LUA_BINARY=lua5.3 LANGUAGES=all DEBUG_SYMBOLS=1

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

%:
	dh $@

override_dh_auto_build:
	dh_auto_build -- $(COMMON_FLAGS) $(CURSES_FLAGS)
	dh_auto_build -- $(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_install:
	dh_auto_install -- $(COMMON_FLAGS) $(CURSES_FLAGS)
	dh_auto_install -- $(COMMON_FLAGS) $(SDL_FLAGS)

override_dh_auto_test:
	# we need to pass build flags, otherwise some files are regenerated
	# and the binaries are relinked.
	LC_ALL=C.UTF-8 XDG_CONFIG_HOME=. dh_auto_test -- $(COMMON_FLAGS)

override_dh_install:
	dh_install -Xfont/ -Xcataicon.ico -XLICENSE.txt -Xchangelog.txt

override_dh_clean:
	$(MAKE) clean distclean
	dh_clean

override_dh_installchangelogs:
	dh_installchangelogs data/changelog.txt