File: rules

package info (click to toggle)
maliit-framework 2.3.0-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,244 kB
  • sloc: cpp: 13,146; ansic: 2,506; xml: 299; makefile: 46; sh: 34; sed: 4
file content (71 lines) | stat: -rwxr-xr-x 2,324 bytes parent folder | download
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
#!/usr/bin/make -f
# -*- makefile -*-

NULL =

export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto

# makes the tests pass in Ubuntu
ifeq ($(shell dpkg-vendor --is Ubuntu && echo yes),yes)
export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions
endif

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

%:
	dh $@ --

override_dh_auto_configure:
	dh_auto_configure --builddirectory=build-qt6 --buildsystem=cmake -- \
		-DBUILD_WITH_QT6=ON  -Denable-glib=OFF -Denable_examples=ON ..
	dh_auto_configure --builddirectory=build-qt5 --buildsystem=cmake -- \
		-DBUILD_WITH_QT6=OFF -Denable-glib=ON  -Denable_examples=ON ..

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

override_dh_auto_install:
	dh_auto_install --builddirectory=build-qt6 --buildsystem=cmake ..
	dh_auto_install --builddirectory=build-qt5 --buildsystem=cmake ..

override_dh_install:
	# drop duplicate files from Qt6 variant build
	rm -rf debian/tmp/usr/share/doc/maliit6-framework-doc

	# re-arrange files in doc:pkg
	mv debian/tmp/usr/share/doc/maliit-framework-doc debian/tmp/usr/share/doc/maliit-framework/html
	rm debian/tmp/usr/share/doc/maliit-framework/LICENSE.LGPL*

	# drop build path from generated .html files
	cd debian/tmp/usr/share/doc/maliit-framework/html && \
	    find . -type f | while read file; do \
	        sed -r -e 's@$(CURDIR)@@g' -i $$file; \
	    done

	# finally, run dh_install
	dh_install

override_dh_installexamples:
	dh_installexamples

	# drop Vcs control files from doc:pkg
	-find debian/maliit-framework-doc/ -name .gitignore -delete

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
ifeq (,$(filter $(DEB_HOST_ARCH),$(TESTSKIP_ARCHITECTURES_QT6)))
	xvfb-run -a dh_auto_test --builddirectory=build-qt6 --buildsystem=cmake --no-parallel ..
endif
ifeq (,$(filter $(DEB_HOST_ARCH),$(TESTSKIP_ARCHITECTURES_QT5)))
	xvfb-run -a dh_auto_test --builddirectory=build-qt5 --buildsystem=cmake --no-parallel ..
endif
endif

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

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