-
Notifications
You must be signed in to change notification settings - Fork 5
/
rules
executable file
·132 lines (113 loc) · 3.68 KB
/
rules
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#!/usr/bin/make -f
#export DH_VERBOSE=1
export DEB_BUILD_HARDENING=1
# The default Mumble build for Unix-like systems
# uses the "-z now" linker flag by default on all
# build products that support it, causing all dynamic
# symbols to be resolved when the program is loaded.
#
# However, the Mumble overlay (libmumble.so, a shared
# library that is often LD_PRELOAD'ed into games),
# expects to be able to resolve OpenGL symbols at
# runtime without linking against a specific libGL
# implementation.
#
# Linking it as "-z now" defeats that, as the
# loader will attempt to resolve the overlay's
# OpenGL symbols at program start-up, which will
# fail because it isn't linked against a library
# providing those symbols.
#
# Disabling the hardening option below is equivalent
# to not linking libmumble.so using the "-z now"
# option. All other products are still linked with
# "-z now".
export DEB_BUILD_HARDENING_BINDNOW=0
MAKEFILE = $(firstword $(MAKEFILE_LIST))
SOURCE_DIR = $(dir $(MAKEFILE))..
VERSION := $(shell dpkg-parsechangelog -l$(dir $(MAKEFILE))changelog | sed -ne 's/^Version: \(.*\)-.*/\1/p')
MUMBLE_DEB_VERSION := $(shell dpkg-parsechangelog -l$(dir $(MAKEFILE))changelog | sed -ne 's/^Version: \(.*\).*/\1/p')
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
endif
export DH_OPTIONS
configure: configure-stamp
configure-stamp:
dh_testdir
qmake -recursive main.pro \
CONFIG*=dpkg-buildflags \
CONFIG*=release \
CONFIG*=symbols \
CONFIG*=no-embed-qt-translations \
CONFIG*=packaged \
CONFIG*=quiet-build-log \
CONFIG*=bundled-celt \
CONFIG*=no-bundled-opus \
CONFIG*=no-g15 \
DEFINES*=NO_UPDATE_CHECK \
DEFINES*=PLUGIN_PATH=/usr/lib/mumble \
DEFINES*=MUMBLE_VERSION=$(MUMBLE_DEB_VERSION) \
DEFINES*=HAVE_LIMITS_H \
DEFINES*=HAVE_ENDIAN_H
touch configure-stamp
build: build-arch
build-arch: build-arch-stamp
build-arch-stamp: configure-stamp
$(MAKE) release
slice2html -I/usr/share/slice -I/usr/share/Ice-3.4.1/slice -I/usr/share/Ice-3.3.1/slice -I/usr/share/Ice-3.5.1/slice -I/usr/share/ice/slice src/murmur/Murmur.ice --output-dir Ice
touch $@
build-indep:
clean:
dh_testdir
dh_testroot
rm -f build-arch-stamp configure-stamp
[ ! -f Makefile ] || $(MAKE) distclean
rm -rf release debug Ice
[ ! -d release-32 ] || rm -rf release-32
rm -f $(CURDIR)/debian/mumble-server.logrotate $(CURDIR)/mumble-server.init
debconf-updatepo
dh_clean
install: install-arch
install-arch:
dh_testdir
dh_testroot
dh_prep
dh_installdirs -s
dh_install -s
install -m 0755 ./scripts/murmur.init $(CURDIR)/debian/mumble-server.init
install -m 0755 ./scripts/murmur.logrotate $(CURDIR)/debian/mumble-server.logrotate
install -m 0644 -D ./scripts/murmur.conf $(CURDIR)/debian/mumble-server/etc/dbus-1/system.d/mumble-server.conf
install -m 0644 -D ./scripts/murmur.ini.system $(CURDIR)/debian/mumble-server/etc/mumble-server.ini
binary-common:
dh_testdir
dh_testroot
dh_installchangelogs CHANGES
dh_installdocs
dh_installmenu
dh_installinit -- defaults 95
dh_installman
dh_lintian
dh_installlogrotate
dh_installdebconf
dh_installexamples
dh_link
dh_gconf
dh_icons
dh_strip --dbg-package=mumble-dbg
# remove debug file libmumble.so.* which does not contain debug symbols
rm -vf ./debian/mumble-dbg/usr/lib/debug/usr/lib/mumble/libmumble.so.*
dh_compress
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary-indep:
binary-arch: build-arch install-arch
$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
binary: binary-arch
.PHONY: clean configure build build-arch build-indep \
binary binary-arch binary-indep binary-common \
install install-arch