Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 #export DH_VERBOSE=1
3
4 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
5 export LC_ALL=C.UTF-8
6 export TZ=UTC
7
8 DEB_CPPFLAGS_MAINT_APPEND := \
9 -DWITH_OPENARENA \
10 $(NULL)
11
12 DEB_CFLAGS_MAINT_APPEND := \
13 -fsigned-char \
14 $(NULL)
15
16 include /usr/share/dpkg/architecture.mk
17
18 ifeq ($(DEB_HOST_ARCH_CPU),i386)
19 # The build fails without this, and Debian >= 13 requires SSE2
20 # as per the release notes
21 DEB_CFLAGS_MAINT_APPEND += -msse2
22 endif
23
24 include /usr/share/dpkg/default.mk
25
26 %:
27 dh $@ --buildsystem=cmake+ninja
28
29 OPTIONS = \
30 -DBUILD_CLIENT=ON \
31 -DBUILD_GAME_LIBRARIES=ON \
32 -DBUILD_GAME_QVMS=OFF \
33 -DBUILD_RENDERER_GL1=ON \
34 -DBUILD_RENDERER_GL2=ON \
35 -DBUILD_SERVER=ON \
36 -DCMAKE_INSTALL_PREFIX=/usr/lib/ioquake3 \
37 -DPRODUCT_VERSION="$(DEB_VERSION)/$(DEB_VENDOR)" \
38 -DUSE_CODEC_VORBIS=ON \
39 -DUSE_FREETYPE=OFF \
40 -DUSE_HTTP=ON \
41 -DUSE_INTERNAL_LIBS=OFF \
42 -DUSE_MUMBLE=ON \
43 -DUSE_OPENAL=ON \
44 -DUSE_OPENAL_DLOPEN=OFF \
45 -DUSE_RENDERER_DLOPEN=ON \
46 -DUSE_VOIP=ON \
47 $(NULL)
48
49 # This might seem unexpected with the existence of the openarena package,
50 # but it's actually what we want. If we built a STANDALONE engine, it would
51 # be suitable for derivatives like OpenArena, but not for Quake III Arena.
52 # A non-STANDALONE engine can still be configured with com_standalone
53 # at runtime.
54 OPTIONS += -DBUILD_STANDALONE=OFF
55
56 override_dh_auto_configure:
57 dh_auto_configure -- $(OPTIONS)
58
59 # Signal to game-data-packager that this version of the engine includes
60 # migration to ~/.local/state/Quake3.
61 execute_after_dh_auto_install:
62 touch debian/tmp/usr/lib/ioquake3/xdg-migration.stamp
63
64 override_dh_auto_test:
65
66 debian/depends.so: debian/shlibdeps-helper.c debian/rules
67 $(CC) -shared $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -Wl,--no-as-needed \
68 -o$@ $< \
69 $$($(PKG_CONFIG) --cflags --libs gl)
70
71 debian/recommends.so: debian/shlibdeps-helper.c debian/rules
72 $(CC) -shared $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -Wl,--no-as-needed \
73 -o$@ $< \
74 $$($(PKG_CONFIG) --cflags --libs libcurl)
75
76 execute_after_dh_shlibdeps-arch: debian/depends.so debian/recommends.so
77 dh_shlibdeps -pioquake3 \
78 -- \
79 --warnings=1 -pdlopen \
80 -dDepends -edebian/depends.so \
81 -dRecommends -edebian/recommends.so \
82 $(NULL)
83
84 ifeq ($(filter pkg.flatpak.app,$(DEB_BUILD_PROFILES)),)
85 ifeq ($(DEB_HOST_ARCH_OS),linux)
86 execute_after_dh_install-arch:
87 dh_apparmor -pioquake3 --profile-name=usr.lib.ioquake3.ioquake3
88 dh_apparmor -pioquake3-server --profile-name=usr.lib.ioquake3.ioq3ded
89 endif
90 endif
91
92 override_dh_installchangelogs:
93 dh_installchangelogs -XChangeLog