File: rules

package info (click to toggle)
7kaa 2.15.6%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 131,312 kB
  • sloc: cpp: 134,790; asm: 3,523; ansic: 1,949; perl: 1,665; makefile: 1,181; sh: 126; pascal: 27
file content (50 lines) | stat: -rwxr-xr-x 1,411 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
#!/usr/bin/make -f
#export DH_VERBOSE=1
include /usr/share/dpkg/architecture.mk
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
else
CROSS= --build $(DEB_BUILD_GNU_TYPE)
endif

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# https://wiki.debian.org/CrossBuildPackagingGuidelines#pkg-config
-include /usr/share/dpkg/buildtools.mk
PKG_CONFIG ?= pkg-config

%:
	dh $@

override_dh_auto_configure:
	./configure $(CROSS) \
		--prefix=/usr \
		--bindir=\$${prefix}/games \
		--datarootdir=\$${prefix}/share \
		--datarootdir=\$${prefix}/share/games \
		--mandir=\$${prefix}/share/man \
		--infodir=\$${prefix}/share/info \
		--disable-silent-rules \
		CXXFLAGS="$(CXXFLAGS) $$($(PKG_CONFIG) --cflags uuid)" \
		LIBS="$$($(PKG_CONFIG) --libs uuid)" \
		CFLAGS="$(CFLAGS)" \
		LDFLAGS="$(LDFLAGS)"

override_dh_auto_build:
	dh_auto_build
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
	(cd doc/ && latexmk main.tex)
endif

override_dh_auto_install:
	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
	rm -rfv debian/7kaa/usr/share/games/doc
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
	install -D doc/main.pdf debian/7kaa-data/usr/share/doc/7kaa/manual.pdf
endif

override_dh_auto_clean:
	dh_auto_clean
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
	(cd doc/ && latexmk -C main.tex)
endif