| 1 |
#!/usr/bin/make -f |
| 2 |
# -*- makefile -*- |
| 3 |
|
| 4 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 5 |
|
| 6 |
# Uncomment this to turn on verbose mode. |
| 7 |
#export DH_VERBOSE=1 |
| 8 |
|
| 9 |
include /usr/share/dpkg/architecture.mk |
| 10 |
|
| 11 |
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) |
| 12 |
export DEB_BUILD_PROFILES := cross |
| 13 |
CONFIGURE_OPTS += -DENABLE_DOCS:BOOL=OFF |
| 14 |
else |
| 15 |
CONFIGURE_OPTS += -DENABLE_DOCS:BOOL=ON -DENABLE_UBUNTU_DOCS:BOOL=ON |
| 16 |
endif |
| 17 |
|
| 18 |
%: |
| 19 |
dh $@ --build-system=cmake |
| 20 |
|
| 21 |
override_dh_auto_configure: |
| 22 |
dh_auto_configure --builddirectory=build-qt5 \ |
| 23 |
-- \ |
| 24 |
"CXXFLAGS=$(CFLAGS)" \ |
| 25 |
-DQT_MAJOR_VERSION:STRING=5 \ |
| 26 |
-DQMLPLUGINDUMP:STRING=/usr/lib/qt5/bin/qmlplugindump \ |
| 27 |
$(CONFIGURE_OPTS) \ |
| 28 |
.. |
| 29 |
dh_auto_configure --builddirectory=build-qt6 \ |
| 30 |
-- \ |
| 31 |
"CXXFLAGS=$(CFLAGS)" \ |
| 32 |
-DQT_MAJOR_VERSION:STRING=6 \ |
| 33 |
-DQMLPLUGINDUMP:STRING=/usr/lib/qt6/bin/qmlplugindump \ |
| 34 |
$(CONFIGURE_OPTS) \ |
| 35 |
|
| 36 |
override_dh_auto_build: |
| 37 |
dh_auto_build --builddirectory=build-qt5 |
| 38 |
dh_auto_build --builddirectory=build-qt6 |
| 39 |
|
| 40 |
override_dh_auto_install: |
| 41 |
dh_auto_install --builddirectory=build-qt5 |
| 42 |
dh_auto_install --builddirectory=build-qt6 |
| 43 |
# remove empty directories |
| 44 |
find debian/tmp -type d -empty -print -delete |
| 45 |
# avoid shipping .gitignore files (mostly in the documentation) |
| 46 |
find debian/tmp -name .gitignore -print -delete |
| 47 |
|
| 48 |
execute_after_dh_clean: |
| 49 |
# remove build-cruft stemming from make docs-html call during dh_auto_build override |
| 50 |
rm -rf doc/html/* |
| 51 |
|
| 52 |
override_dh_auto_test: |
| 53 |
dh_auto_test --builddirectory=build-qt5 |
| 54 |
dh_auto_test --builddirectory=build-qt6 |
| 55 |
|
| 56 |
override_dh_auto_clean: |
| 57 |
dh_auto_clean --builddirectory=build-qt5 |
| 58 |
dh_auto_clean --builddirectory=build-qt6 |
| 59 |
|
| 60 |
get-orig-source: |
| 61 |
uscan --noconf --force-download --rename --download-current-version --destdir=.. |