File: rules

package info (click to toggle)
jamulus 3.9.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,812 kB
  • sloc: ansic: 53,095; cpp: 21,041; sh: 4,473; asm: 723; makefile: 361; perl: 264; xml: 36
file content (41 lines) | stat: -rwxr-xr-x 1,499 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

export QT_SELECT=qt5
DEB_TARGET_GNU_TYPE := $(shell dpkg-architecture -qDEB_TARGET_GNU_TYPE)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
	QMAKE := qmake
else
	QMAKE := "/usr/lib/$(DEB_BUILD_GNU_TYPE)/qt5/bin/qmake" -qtconf "/usr/lib/$(DEB_TARGET_GNU_TYPE)/qt5/qt.conf" -spec "/usr/lib/$(DEB_TARGET_GNU_TYPE)/qt5/mkspecs/$(DEB_TARGET_GNU_TYPE)-g++" LIBS+="-lstdc++ -lm"
endif

%:
	dh $@

override_dh_update_autotools_config:
	# dh_update_autotools_config replaces libs/opus/config.{sub,guess}.
	# This is unnecessary as we don't build opus via autotools at all
	# (we use qmake). In addition, this would cause our -dev version generation
	# logic to mark Debian builds as -dirty by default.
	# Therefore, disable this behavior:
	:

override_dh_auto_configure:
	mkdir -p build-gui && cd build-gui && $(QMAKE) "CONFIG+=noupcasename" PREFIX=/usr ../Jamulus.pro
	mkdir -p build-nox && cd build-nox && $(QMAKE) "CONFIG+=headless serveronly" TARGET=jamulus-headless PREFIX=/usr ../Jamulus.pro

override_dh_auto_build:
	cd src/translation && lrelease *.ts
	cd build-gui && make -j "$$(nproc)"
	cd build-nox && make -j "$$(nproc)"

override_dh_auto_install:
	cd build-nox && make install INSTALL_ROOT=../debian/tmp
	cd build-gui && make install INSTALL_ROOT=../debian/tmp

override_dh_auto_clean:
	rm -rf build-gui
	rm -rf build-nox
	dh_clean