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 133 134 135
|
#!/usr/bin/make -f
#export DH_VERBOSE = 1
# Use already defined DEB_HOST_* variables.
include /usr/share/dpkg/architecture.mk
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto
sslpkgname := $(shell dpkg-query --show '--showformat=$${Depends}' libssl-dev | cut -d ' ' -f1)
ifneq (,$(filter libqt6sql6-ibase,$(shell dh_listpackages)))
extra_cmake_args += -DFEATURE_sql_ibase=ON
else
extra_cmake_args += -DFEATURE_sql_ibase=OFF
endif
ifeq ($(DEB_HOST_ARCH_OS),linux)
extra_cmake_args += -DFEATURE_sctp=ON
else
extra_cmake_args += -DFEATURE_sctp=OFF
endif
# cross-builds
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
extra_cmake_args += \
-DQT_HOST_PATH=/usr \
-DQT_HOST_PATH_CMAKE_DIR=/usr/lib/${DEB_BUILD_MULTIARCH}/cmake \
-DQT_FORCE_BUILD_TOOLS=ON
endif
# enable ccache with corresponding build-profile
ifneq ($(filter ccache,$(DEB_BUILD_PROFILES)),)
extra_cmake_args += -DQT_USE_CCACHE=ON
endif
%:
dh $@ --buildsystem=cmake+ninja
override_dh_auto_configure:
dh_auto_configure -- \
--log-level=STATUS \
-DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) \
-DCMAKE_INSTALL_PREFIX=/usr \
-DINSTALL_BINDIR=lib/qt6/bin \
-DINSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) \
-DINSTALL_LIBEXECDIR=lib/qt6/libexec \
-DINSTALL_ARCHDATADIR=lib/$(DEB_HOST_MULTIARCH)/qt6 \
-DINSTALL_EXAMPLESDIR=lib/$(DEB_HOST_MULTIARCH)/qt6/examples \
-DINSTALL_DATADIR=share/qt6 \
-DINSTALL_DOCDIR=share/qt6/doc \
-DINSTALL_SYSCONFDIR=/etc/xdg \
-DINSTALL_INCLUDEDIR=include/$(DEB_HOST_MULTIARCH)/qt6 \
-DINSTALL_TRANSLATIONSDIR=share/qt6/translations \
-DINSTALL_MKSPECSDIR=lib/$(DEB_HOST_MULTIARCH)/qt6/mkspecs \
-DINSTALL_PUBLICBINDIR=bin \
-DQT_BUILD_EXAMPLES=ON \
-DQT_INSTALL_EXAMPLES_SOURCES=ON \
-DFEATURE_accessibility=ON \
-DFEATURE_cups=ON \
-DFEATURE_dbus_linked=ON \
-DFEATURE_directfb=OFF \
-DFEATURE_doubleconversion=ON \
-DFEATURE_fontconfig=ON \
-DFEATURE_freetype=ON \
-DFEATURE_glib=ON \
-DFEATURE_gtk3=ON \
-DFEATURE_harfbuzz=ON \
-DFEATURE_icu=ON \
-DFEATURE_jpeg=ON \
-DFEATURE_libproxy=ON \
-DFEATURE_mimetype_database=OFF \
-DFEATURE_pcre2=ON \
-DFEATURE_png=ON \
-DFEATURE_reduce_relocations=OFF \
-DFEATURE_relocatable=OFF \
-DFEATURE_rpath=OFF \
-DFEATURE_sql_mysql=ON \
-DFEATURE_sql_odbc=ON \
-DFEATURE_sql_psql=ON \
-DFEATURE_sql_sqlite=ON \
-DFEATURE_ssl=ON \
-DFEATURE_system_jpeg=ON \
-DFEATURE_system_libb2=ON \
-DFEATURE_system_pcre2=ON \
-DFEATURE_system_png=ON \
-DFEATURE_system_proxies=ON \
-DFEATURE_system_sqlite=ON \
-DFEATURE_system_xcb_xinput=ON \
-DFEATURE_system_zlib=ON \
$(extra_cmake_args)
execute_after_dh_auto_install-arch:
# Reproducible builds: remove build paths from .prl files
sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libQt6*.prl
# Specifies parameters to pass to the platform plugin.
mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/qt6
sed 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/' debian/qt.conf.in \
> debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/qt6/qt6.conf
# Inject cross-wrapper for qmake6 and qtpaths
mkdir -p debian/tmp/usr/bin
sed -e 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
-e 's/@DEB_HOST_GNU_TYPE@/$(DEB_HOST_GNU_TYPE)/g' \
< debian/qmake-cross-wrapper.in > debian/tmp/usr/bin/$(DEB_HOST_GNU_TYPE)-qmake6
sed -e 's/@DEB_HOST_MULTIARCH@/$(DEB_HOST_MULTIARCH)/g' \
< debian/qtpaths-cross-wrapper.in > debian/tmp/usr/bin/$(DEB_HOST_GNU_TYPE)-qtpaths6
chmod +x debian/tmp/usr/bin/$(DEB_HOST_GNU_TYPE)-qmake6 debian/tmp/usr/bin/$(DEB_HOST_GNU_TYPE)-qtpaths6
# Fix Qt6::qmake IMPORTED_LOCATION, see https://bugs.debian.org/1030980
sed -i 's,lib/qt6/bin/qmake,bin/$(DEB_HOST_GNU_TYPE)-qmake6,' \
debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/Qt6CoreTools/Qt6CoreToolsTargets-none.cmake
# Fix Qt6::qtpaths IMPORTED_LOCATION
sed -i 's,lib/qt6/bin/qtpaths,bin/$(DEB_HOST_GNU_TYPE)-qtpaths6,' \
debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/cmake/Qt6CoreTools/Qt6CoreToolsTargets-none.cmake
override_dh_auto_build-indep:
dh_auto_build -- docs
override_dh_auto_install-indep:
DESTDIR=$(CURDIR)/debian/tmp dh_auto_build -- install_docs
# Remove build path from index files.
find $(CURDIR)/debian/tmp/usr/share/qt6/doc -type f -name *.index -exec \
sed -i 's@$(CURDIR)/@@g' {} \;
override_dh_makeshlibs:
dh_makeshlibs -XlibQt6EglFSDeviceIntegration -XlibQt6EglFsKmsGbmSupport -XlibQt6EglFsKmsSupport -XlibQt6XcbQpa
execute_after_dh_shlibdeps-arch:
echo libssl:Depends=$(sslpkgname) >> debian/libqt6network6.substvars
# Do not run tests when building the documentation
override_dh_auto_test-indep:
|