File: rules

package info (click to toggle)
godot 3.2.3-stable-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 121,308 kB
  • sloc: cpp: 804,285; ansic: 597,434; xml: 77,823; asm: 17,127; cs: 13,535; lisp: 12,017; python: 9,376; java: 7,474; sh: 973; javascript: 659; perl: 264; pascal: 203; objc: 116; makefile: 105
file content (79 lines) | stat: -rwxr-xr-x 2,779 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
74
75
76
77
78
79
#!/usr/bin/make -f
export DH_VERBOSE = 1
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
BITS = $(shell dpkg-architecture -q DEB_TARGET_ARCH_BITS)

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

override_dh_clean:
	dh_clean
	scons -c
	find . -iname "*.gen.cpp" -delete
	find . -iname "*.gen.h" -delete
	find . -iname "*.pyc" -delete
	find . -iname ".a" -delete
	find . -iname ".o" -delete
	find . -iname ".scons_env.json" -delete
	find . -iname ".sconsign.dblite" -delete
	find . -name '*.o' -delete
	rm -rf .sconf_temp/
	rm -rf main/libmain.x11.opt.tools.64.a main/tests/libtests.x11.opt.tools.64.a
	rm -rf config.log .sconsign?.dblite
	rm -rf bin/
	rm -rf enet
	rm -rf freetype
	rm -rf libogg
	rm -rf libpng
	rm -rf libtheora
	rm -rf libvorbis
	rm -rf libvpx
	rm -rf libwebp
	rm -rf openssl
	rm -rf opus
	rm -rf pcre2
	rm -rf squish
	rm -rf zlib

include /usr/share/dpkg/architecture.mk  # provides DEB_HOST_ARCH_BITS

# bullet requires 2.88

SCONS_OPTIONS = bits=$(DEB_HOST_ARCH_BITS) \
	system_certs_path=/etc/ssl/certs/ca-certificates.crt \
	builtin_bullet=yes \
	builtin_enet=no \
	builtin_freetype=no \
	builtin_libogg=no \
	builtin_libpng=no \
	builtin_libtheora=no \
	builtin_libvorbis=no \
	builtin_libvpx=no \
	builtin_libwebp=no \
	builtin_openssl=no \
	builtin_opus=no \
	builtin_pcre2=no \
	builtin_squish=no \
	builtin_zlib=no \
	builtin_zstd=yes

%:
	dh $@

override_dh_auto_build:
	dh_auto_build
	scons platform=server tools=yes target=release_debug $(SCONS_OPTIONS) -j $(NUMJOBS) CCFLAGS="$(CXXFLAGS)" LINKFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)"
	scons platform=x11    tools=no  target=release       $(SCONS_OPTIONS) -j $(NUMJOBS) CCFLAGS="$(CXXFLAGS)" LINKFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)"
	scons platform=x11    tools=yes target=release_debug $(SCONS_OPTIONS) -j $(NUMJOBS) CCFLAGS="$(CXXFLAGS)" LINKFLAGS="$(LDFLAGS)" CFLAGS="$(CFLAGS)"

override_dh_auto_install:
	echo "Installing binaries for $(BITS) bits architecture"
	install -D -m 400 $(CURDIR)/bin/godot.x11.opt.tools.$(BITS)           $(CURDIR)/debian/godot3/usr/bin/godot3
	install -D -m 400 $(CURDIR)/bin/godot.x11.opt.$(BITS)                 $(CURDIR)/debian/godot3-runner/usr/bin/godot3-runner
	install -D -m 400 $(CURDIR)/bin/godot_server.x11.opt.tools.$(BITS) $(CURDIR)/debian/godot3-server/usr/bin/godot3-server
	install -D -m 444 $(CURDIR)/misc/dist/linux/org.godotengine.Godot.desktop  $(CURDIR)/debian/godot3/usr/share/applications/godot3.desktop
	install -D -m 644 $(CURDIR)/icon.svg                                       $(CURDIR)/debian/godot3/usr/share/pixmaps/godot.svg
	sed -i 's/^Exec=.*/Exec=godot3 -p/' $(CURDIR)/debian/godot3/usr/share/applications/godot3.desktop
	dh_auto_install