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
|
#!/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 ".sconsign.dblite" -delete
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) \
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.server.opt.tools.$(BITS) $(CURDIR)/debian/godot3-server/usr/bin/godot3-server
install -D -m 444 $(CURDIR)/misc/dist/linux/godot.desktop $(CURDIR)/debian/godot3/usr/share/applications/godot3.desktop
sed -i 's/^Exec=.*/Exec=godot3 -p/' $(CURDIR)/debian/godot3/usr/share/applications/godot3.desktop
dh_auto_install
|