| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
include /usr/share/dpkg/architecture.mk |
| 4 |
|
| 5 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto |
| 6 |
|
| 7 |
# QT_HOST_PATH isn't passed in cross-builds |
| 8 |
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) |
| 9 |
extra_cmake_args += \ |
| 10 |
-DQT_HOST_PATH=/usr \ |
| 11 |
-DQT_HOST_PATH_CMAKE_DIR=/usr/lib/${DEB_HOST_MULTIARCH}/cmake |
| 12 |
endif |
| 13 |
|
| 14 |
# enable ccache with corresponding build-profile |
| 15 |
ifneq ($(filter ccache,$(DEB_BUILD_PROFILES)),) |
| 16 |
extra_cmake_args += -DQT_USE_CCACHE=ON |
| 17 |
endif |
| 18 |
|
| 19 |
%: |
| 20 |
dh $@ --buildsystem=cmake+ninja |
| 21 |
|
| 22 |
override_dh_auto_configure: |
| 23 |
dh_auto_configure -- \ |
| 24 |
--log-level=STATUS \ |
| 25 |
-DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) \ |
| 26 |
$(extra_cmake_args) |
| 27 |
|
| 28 |
override_dh_auto_build-indep: |
| 29 |
dh_auto_build -- docs |
| 30 |
|
| 31 |
override_dh_auto_install-indep: |
| 32 |
DESTDIR=$(CURDIR)/debian/tmp dh_auto_build -- install_docs |
| 33 |
# Remove build path from index files. |
| 34 |
find $(CURDIR)/debian/tmp/usr/share/qt6/doc -type f -name *.index -exec \ |
| 35 |
sed -i 's@$(CURDIR)/@@g' {} \; |
| 36 |
|
| 37 |
execute_after_dh_auto_install-arch: |
| 38 |
# Reproducible builds: remove build paths from .prl files |
| 39 |
sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libQt6*.prl |
| 40 |
# Reproducible builds: remove kernel version from build artifacts |
| 41 |
sed -i '/^[[:space:]]*"version":.*deb/d' debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/qt6/modules/*.json |