| 1 |
#!/usr/bin/make -f |
| 2 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto |
| 3 |
|
| 4 |
include /usr/share/dpkg/pkg-info.mk |
| 5 |
|
| 6 |
webengine_archs := amd64 arm64 armhf i386 |
| 7 |
ifeq ($(DEB_HOST_ARCH), $(filter $(DEB_HOST_ARCH),$(webengine_archs))) |
| 8 |
BUILD_WEBENGINE := ON |
| 9 |
else |
| 10 |
BUILD_WEBENGINE := OFF |
| 11 |
endif |
| 12 |
|
| 13 |
CONFIGURE_OPTIONS := -DCMAKE_INSTALL_PREFIX=/usr \ |
| 14 |
-DBUILD_UPDATER=OFF \ |
| 15 |
-DPLUGINDIR=/usr/lib/$(DEB_HOST_GNU_TYPE)/qt6/plugins \ |
| 16 |
-DEXTERNAL_VERSION=$(DEB_VERSION) \ |
| 17 |
-DMIRALL_VERSION_SUFFIX="" |
| 18 |
|
| 19 |
%: |
| 20 |
dh $@ |
| 21 |
|
| 22 |
override_dh_auto_configure: |
| 23 |
ifeq (-i,$(findstring -i, $(DH_INTERNAL_OPTIONS))) |
| 24 |
@echo " -- Configure for arch all only build --" |
| 25 |
dh_auto_configure -- \ |
| 26 |
-DBUILD_TESTING=OFF \ |
| 27 |
-DBUILD_SHELL_INTEGRATION_DOLPHIN=OFF \ |
| 28 |
-DBUILD_WITH_WEBENGINE=OFF \ |
| 29 |
$(CONFIGURE_OPTIONS) |
| 30 |
else |
| 31 |
dh_auto_configure -- \ |
| 32 |
-DUNIT_TESTING=ON \ |
| 33 |
-DBUILD_WITH_WEBENGINE=$(BUILD_WEBENGINE) \ |
| 34 |
$(CONFIGURE_OPTIONS) |
| 35 |
endif |
| 36 |
execute_before_dh_auto_build-arch: |
| 37 |
@echo "blhc: ignore-line-regexp: .*/CMakeCXXCompilerABI.cpp.*" |
| 38 |
#tests are not built with all hardening, to debug stuff more easily |
| 39 |
@echo "blhc: ignore-line-regexp: .*Test.dir/.*" |
| 40 |
@echo "blhc: ignore-line-regexp: .*/check_.*.dir/.*" |
| 41 |
@echo "blhc: ignore-line-regexp: .*/test/csync/torture_.*" |
| 42 |
@echo "blhc: ignore-line-regexp: .*/test/.*" |
| 43 |
@echo "blhc: ignore-line-regexp: .*/LargeSyncBench\.dir/.*" |
| 44 |
|
| 45 |
# unfortunately icons and translations are installed only together with the gui, so we need to run dh_auto_build |
| 46 |
execute_before_dh_auto_build-indep: |
| 47 |
dh_auto_build -- -C shell_integration/nautilus |
| 48 |
|
| 49 |
override_dh_auto_test-indep: |
| 50 |
|
| 51 |
|
| 52 |
override_dh_auto_test-arch: |
| 53 |
mkdir -p obj-$(DEB_HOST_GNU_TYPE)/config |
| 54 |
- LC_ALL=C.UTF-8 XDG_CONFIG_HOME=$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/config xvfb-run -a \ |
| 55 |
-s "-screen 0 1024x768x24 +extension RANDR +extension RENDER +extension GLX" \ |
| 56 |
-- dh_auto_test --no-parallel |
| 57 |
rm -r obj-$(DEB_HOST_GNU_TYPE)/config |