Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 export DH_VERBOSE=1
4 # Attempt to harden the build
5 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
6 # Remove remove "-z,now" LDFLAGS because mumble-overlay (libmumble.so)
7 # needs to be able to resolve OpenGL symbols at runtime rather than linking
8 # to a specific libGL implementation
9 export DEB_LDFLAGS_MAINT_STRIP = -r,now
10 # NOTE: there seems to be difficulties with build hardening for packages using
11 # CMake; see: https://wiki.debian.org/Hardening#Notes_for_packages_using_CMake
12 DEB_BUILD_NUMBER := $(shell dpkg-parsechangelog -S Version | cut -d'.' -f 3 | cut -d'-' -f 1)
13 # Try to set Debian hardening build flags
14 CMAKE_C_FLAGS := $(CFLAGS)
15 CMAKE_XX_FLAGS := $(CXXFLAGS)
16 CMAKE_SHARED_LINKER_FLAGS := $(LDFLAGS)
17
18 # qtchooser will try to use qmake from qt4 even if it's not installed
19 export QT_SELECT=qt5
20
21 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
22 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
23 MAKEFLAGS += -j$(NUMJOBS)
24 endif
25
26 export DH_OPTIONS
27
28 %:
29 dh $@ --buildsystem=cmake
30
31 override_dh_auto_configure:
32 dh_auto_configure -- \
33 -DBUILD_NUMBER=$(DEB_BUILD_NUMBER) \
34 -DCMAKE_BUILD_TYPE=Release \
35 -Dbundle-qt-translations=OFF \
36 -Dbundled-gsl=OFF \
37 -Dbundled-json=OFF \
38 -Dbundled-renamenoise=ON \
39 -Dbundled-speex=OFF \
40 -Doverlay=ON \
41 -Doverlay-xcompile=OFF \
42 -Dsymbols=ON \
43 -Dupdate=OFF \
44 -Duse-pkgconf-install-paths=ON \
45 -Dwarnings-as-errors=OFF
46
47 override_dh_clean:
48 rm -rfv Ice
49 # logratate and init file have both been removed
50 #rm -fv $(CURDIR)/debian/mumble-server.logrotate $(CURDIR)/mumble-server.init
51 debconf-updatepo
52 dh_clean
53
54 override_dh_auto_build:
55 # Create Ice HTML files and place in Ice/ directory to be installed with mumble-server.docs
56 slice2html -I/usr/share/ice/slice -I/usr/share/slice src/murmur/MumbleServer.ice --output-dir Ice
57 dh_auto_build