File: rules

package info (click to toggle)
gsettings-qt 1.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 272 kB
  • sloc: cpp: 635; makefile: 45; xml: 31
file content (67 lines) | stat: -rwxr-xr-x 2,541 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto
export DEB_LDFLAGS_MAINT_APPEND =
export QT_SELECT := 5

# Force aligned access to fix FTBFS / Bus Error on armhf
export DEB_CFLAGS_MAINT_APPEND = -mno-unaligned-access

# Skip tests on the archs they are known to be flaky
testskip_architectures := powerpc armhf

include /usr/share/dpkg/architecture.mk

override_dh_auto_configure:
	dh_auto_configure --builddirectory=build-qt6 --buildsystem=cmake -- \
	    -DENABLE_QT6=ON \
	    -DENABLE_WERROR=OFF \
	    ..
	dh_auto_configure --builddirectory=build-qt5 --buildsystem=cmake -- \
	    -DENABLE_QT6=OFF \
	    -DENABLE_WERROR=ON \
	    ..

override_dh_auto_build:
	dh_auto_build --builddirectory=build-qt6 --buildsystem=cmake ..
	dh_auto_build --builddirectory=build-qt5 --buildsystem=cmake ..

override_dh_auto_test:
ifneq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(testskip_architectures)))
	QT_QPA_PLATFORM=minimal LD_LIBRARY_PATH=../src GSETTINGS_BACKEND=memory GSETTINGS_SCHEMA_DIR=. xvfb-run -a dh_auto_test --builddirectory=build-qt6
	QT_QPA_PLATFORM=minimal LD_LIBRARY_PATH=../src GSETTINGS_BACKEND=memory GSETTINGS_SCHEMA_DIR=. xvfb-run -a dh_auto_test --builddirectory=build-qt5
endif

override_dh_auto_install:
	mkdir -p "$(CURDIR)/debian/run-dir/"
	chmod 7700 "$(CURDIR)/debian/run-dir/"
	export XDG_RUNTIME_DIR="$(CURDIR)/debian/run-dir/" && dh_auto_install --no-parallel \
	                                                                      --builddirectory=build-qt6 \
	                                                                      --buildsystem=cmake \
	                                                                      ..
	export XDG_RUNTIME_DIR="$(CURDIR)/debian/run-dir/" && dh_auto_install --no-parallel \
	                                                                      --builddirectory=build-qt5 \
	                                                                      --buildsystem=cmake \
	                                                                      ..
	rm -Rfv "$(CURDIR)/debian/run-dir/"

override_dh_install:
	rm -rf debian/*/usr/tests
	dh_install

override_dh_auto_clean:
	dh_auto_clean --builddirectory=build-qt6 --buildsystem=cmake ..
	dh_auto_clean --builddirectory=build-qt5 --buildsystem=cmake ..


%:
	dh $@


get-orig-source:
	uscan --noconf --force-download --rename --download-current-version --destdir=..