File: rules

package info (click to toggle)
qtcreator 9.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 236,528 kB
  • sloc: cpp: 1,450,833; ansic: 297,419; javascript: 118,888; xml: 65,147; python: 33,908; sh: 2,088; yacc: 1,847; asm: 1,731; perl: 1,501; java: 695; objc: 409; lex: 194; makefile: 70; cs: 41; sed: 22
file content (78 lines) | stat: -rwxr-xr-x 2,767 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
73
74
75
76
77
78
#!/usr/bin/make -f

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

include /usr/share/dpkg/architecture.mk

# Do not build the HelloWorld plugin, as it is not needed
export QTC_BUILD_PLUGIN_HELLOWORLD=FALSE

# The upstream version of a package passed as parameter
upstream_version_of_pkg = $(shell dpkg-query -f '$${Version}' -W $(1) | sed -e 's/-[^-]*$$//')

# the dwz processing for all the libraries and plugins can take a lot of memory,
# which may be not enough on some architectures (typically 32bit), resulting in
# dwz failing with "Could not allocate memory: Cannot allocate memory" errors;
# hence, on architectures where we see this result, try to use a more memory
# friendly processing for a lower number of DIEs (dwz default is 10M)
archs_with_dwz_low_mem = armel armhf mipsel
dwz_low_mem = 3000000

archs_using_clang = mips64el mipsel
ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(archs_using_clang)))
export CC=clang
export CXX=clang++
export DEB_CFLAGS_MAINT_APPEND := -gdwarf-4
export DEB_CXXFLAGS_MAINT_APPEND := -gdwarf-4
export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed
EXTRA_CMAKE_ARGS += -DBUILD_WITH_PCH=OFF
endif

%:
	dh $@ --builddirectory=builddir

override_dh_auto_configure:
	dh_auto_configure --buildsystem=cmake -- \
		-DBUILD_DEVELOPER_DOCS=ON \
		-DBUILD_QBS=OFF \
		-DWITH_TESTS=OFF \
		-DBUILD_TESTING=OFF \
		-DCLANGTOOLING_LINK_CLANG_DYLIB=ON \
		-DWITH_DOCS=$(if $(filter qtcreator-doc, $(shell dh_listpackages)),ON,OFF) \
		$(EXTRA_CMAKE_ARGS)

execute_after_dh_auto_build-indep:
	dh_auto_build -- docs

execute_after_dh_auto_install:
ifneq (,$(filter qtcreator-doc, $(shell dh_listpackages)))
	DESTDIR=$(CURDIR)/debian/tmp cmake --install $(CURDIR)/builddir --component qch_docs
	DESTDIR=$(CURDIR)/debian/tmp cmake --install $(CURDIR)/builddir --component html_docs
endif

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

	# License files of the embedded copy of KSyntaxHighlighting
	rm -rf debian/tmp/usr/share/qtcreator/generic-highlighter/syntax/licenses/

	# Remove extra exec permissions
	find debian/tmp -name qmldir -type f -perm /111 -exec chmod -v -x {} \;

execute_after_dh_install:
	# Copied in qtcreator-doc already
	rm -rf debian/qtcreator-data/usr/share/qtcreator/doc/

override_dh_makeshlibs:
	dh_makeshlibs -Xusr/lib/$(DEB_HOST_MULTIARCH)/qtcreator/

override_dh_shlibdeps:
	echo 'libQt6DesignerComponents 6 libqt6designercomponents6 (>= $(call upstream_version_of_pkg,libqt6designercomponents6)~)' > debian/shlibs.local
	dh_shlibdeps -l$(CURDIR)/debian/qtcreator/usr/lib/$(DEB_HOST_MULTIARCH)/qtcreator
	rm debian/shlibs.local

ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(archs_with_dwz_low_mem)))
override_dh_dwz:
	dh_dwz -- --low-mem-die-limit $(dwz_low_mem)
endif