File: rules

package info (click to toggle)
yquake2 8.20%2Bctf1.09%2Bdfsg-1
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm
  • size: 7,964 kB
  • sloc: ansic: 176,742; makefile: 1,012; sh: 51
file content (73 lines) | stat: -rwxr-xr-x 1,921 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+all
export LC_ALL=C.UTF-8
export TZ=UTC

DEB_LDFLAGS_MAINT_APPEND  += -Wl,-z,defs
export DEB_LDFLAGS_MAINT_APPEND
DPKG_EXPORT_BUILDFLAGS = yes
include /usr/share/dpkg/default.mk
export CFLAGS += $(CPPFLAGS)

%:
	dh $@

export LC_ALL=C.UTF-8
export TZ=UTC

# YQ2_ARCH is meant to be uname -m, except that i?86, amd64 and arm*
# are normalized to i386, x86_64 and arm respectively; the value matters,
# because it appears in saved games. Newer CPU architectures tend to have
# the GNU CPU name be the same as the Linux uname -m, because anything
# else would be pointless complication.
ifeq ($(DEB_HOST_ARCH_CPU),i386)
# Don't use i686 here
YQ2_ARCH=i386
else ifeq ($(DEB_HOST_ARCH_CPU),powerpc)
# Linux and GNU disagree on the canonical name of this architecture
YQ2_ARCH=ppc
else ifeq ($(DEB_HOST_ARCH_CPU),ppc64el)
# Linux and GNU disagree on the canonical name of this architecture
YQ2_ARCH=ppc64le
else
# This is the same as uname -m on most architectures. On ARM it's just
# "arm" which is what we wanted anyway.
YQ2_ARCH=$(DEB_HOST_GNU_CPU)
endif

# Similarly, YQ2_OSTYPE is meant to be uname -s.
ifeq ($(DEB_HOST_ARCH_OS),linux)
YQ2_OSTYPE=Linux
else ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
YQ2_OSTYPE=GNU/kFreeBSD
else ifeq ($(DEB_HOST_ARCH_OS),hurd)
YQ2_OSTYPE=GNU
else
$(error Set YQ2_OSTYPE to the value of uname -s on $(DEB_HOST_ARCH))
endif

override_dh_auto_build:
	dh_auto_build -- \
		VERBOSE=1 \
		WITH_RPATH=no \
		WITH_SYSTEMWIDE=yes \
		YQ2_ARCH=$(YQ2_ARCH) \
		YQ2_OSTYPE=$(YQ2_OSTYPE) \
		${NULL}
	dh_auto_build --sourcedirectory=ctf -- \
		VERBOSE=1 \
		YQ2_ARCH=$(YQ2_ARCH) \
		YQ2_OSTYPE=$(YQ2_OSTYPE) \
		${NULL}

override_dh_install:
	install -d debian/tmp
	install -m644 CHANGELOG debian/tmp/NEWS
	dh_install

override_dh_installchangelogs:
	dh_installchangelogs -XCHANGELOG

override_dh_installdocs:
	dh_installdocs README.md doc/*.md