File: rules

package info (click to toggle)
qtcreator 4.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 125,304 kB
  • ctags: 135,867
  • sloc: cpp: 898,751; ansic: 198,169; python: 20,833; xml: 15,005; perl: 868; java: 839; sh: 640; objc: 302; lex: 125; makefile: 49; cs: 41; yacc: 29; asm: 23; sed: 12
file content (72 lines) | stat: -rwxr-xr-x 2,678 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
export CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) $(shell dpkg-buildflags --get CPPFLAGS)
export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed
export QMAKE_CFLAGS_RELEASE := $(CFLAGS)
export QMAKE_CFLAGS_DEBUG := $(CFLAGS)
export QMAKE_CXXFLAGS_RELEASE := $(CXXFLAGS)
export QMAKE_CXXFLAGS_DEBUG := $(CXXFLAGS)
export QMAKE_LFLAGS_RELEASE := $(LDFLAGS)
export QMAKE_LFLAGS_DEBUG := $(LDFLAGS)
export QT_SELECT := qt5
export LLVM_INSTALL_DIR := $(shell if [ -d /usr/lib/llvm-3.9 ]; then echo /usr/lib/llvm-3.9; fi)

# Upstream changelog
upstream_changes := $(wildcard dist/changes-*)

%:
	dh $@ --parallel --builddirectory=builddir

override_dh_auto_configure:
	mkdir -p builddir
	cd builddir ; \
		qmake -recursive QMAKE_CFLAGS_RELEASE="$(QMAKE_CFLAGS_RELEASE)" \
		QMAKE_CFLAGS_DEBUG="$(QMAKE_CFLAGS_DEBUG)" \
		QMAKE_CXXFLAGS_RELEASE="$(QMAKE_CXXFLAGS_RELEASE)" \
		QMAKE_CXXFLAGS_DEBUG="$(QMAKE_CXXFLAGS_DEBUG)" \
		QMAKE_LFLAGS_RELEASE="$(QMAKE_LFLAGS_RELEASE)" \
		QMAKE_LFLAGS_DEBUG="$(QMAKE_LFLAGS_DEBUG)" \
		QMAKE_STRIP=: \
		QBS_INSTALL_DIR=/usr \
		PREFIX=/usr/ \
		LLVM_INSTALL_DIR="$(LLVM_INSTALL_DIR)" \
		CONFIG+=disable_external_rpath \
		$(CURDIR) IDE_LIBRARY_BASENAME=lib/$(DEB_HOST_MULTIARCH) IDE_PACKAGE_MODE=1 USE_SYSTEM_BOTAN=1 $(extra_configure_opts)

ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), armhf))
	# Hack over a g++ problem while using -O2 on armhf.
	# If you don't like this horrible hack please feel free to help me try to
	# reproduce it in a minimal test case so as to be able to properly fill a
	# bug against g++.
	sed -i 's/O2/O1/g' builddir/src/plugins/qmldesigner/Makefile.qmldesignerplugin
endif

override_dh_auto_install:
ifneq (,$(filter qtcreator-doc, $(shell dh_listpackages)))
	dh_auto_build -- qch_docs
endif
	dh_auto_install --destdir=debian/tmp/usr
	dh_auto_build -- install_docs INSTALL_ROOT=$(CURDIR)/debian/tmp/usr

	# Do not install the file, we better symlink it.
	rm -vf debian/tmp/usr/share/qtcreator/debugger/LICENSE.LGPL

	# Not needed
	rm debian/tmp/usr/bin/qtcreator.sh

override_dh_install:
	dh_install --fail-missing

override_dh_installdocs:
	dh_installdocs -pqtcreator-data $(upstream_changes)
	dh_installdocs --remaining-packages

override_dh_shlibdeps:
	dh_shlibdeps -l$(CURDIR)/debian/qtcreator/usr/lib/$(DEB_HOST_MULTIARCH)/qtcreator:\
	$(CURDIR)/debian/qtcreator/usr/lib/$(DEB_HOST_MULTIARCH)/qtcreator/plugins/QtProject