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
|
#!/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 = armhf hurd-i386
dwz_low_mem = 3000000
%:
dh $@ --builddirectory=builddir
override_dh_auto_configure:
dh_auto_configure --buildsystem=cmake -- \
-DBUILD_QBS=OFF \
-DWITH_TESTS=OFF \
-DBUILD_TESTING=OFF \
-DCLANGTOOLING_LINK_CLANG_DYLIB=ON \
-DBUILD_EXECUTABLE_CMDBRIDGE=OFF \
-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/
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
override_dh_strip:
dh_strip -Xusr/libexec/qtcreator/cmdbridge
|