File: rules

package info (click to toggle)
qtfeedback-opensource-src 5.0~git20180903.a14bd0b-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,104 kB
  • sloc: cpp: 3,385; makefile: 49
file content (79 lines) | stat: -rwxr-xr-x 2,380 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
72
73
74
75
76
77
78
79
#!/usr/bin/make -f

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

NULL =

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

export QT_SELECT := qt5

include /usr/share/dpkg/architecture.mk

QT_MODULE_VERSION = $(shell cat .qmake.conf | grep MODULE_VERSION | sed -re 's/MODULE_VERSION\s*=\s*([^\s]+)\s*/\1/')

%:
	dh $@ --with pkgkde_symbolshelper

override_dh_auto_build:
	dh_auto_build

	# only build doc files for architectures that have qt5-qtdoc
	if [ -e /usr/lib/$(DEB_HOST_MULTIARCH)/qt5/bin/qdoc ]; then \
	    make docs; \
	fi

override_dh_auto_configure:
	cp -av doc doc.dpkg-bak

	cd src/feedback/ && perl /usr/lib/qt5/bin/syncqt.pl -module QtFeedback -version $(QT_MODULE_VERSION) -outdir $(CURDIR) -builddir $(CURDIR) $(CURDIR) && cd - 1>/dev/null
	dh_auto_configure

override_dh_auto_install:
	dh_auto_install

	# only install doc files for architectures that have qt5-qtdoc
	if [ -e /usr/lib/$(DEB_HOST_MULTIARCH)/qt5/bin/qdoc ]; then \
	    $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/tmp install_docs; \
	fi

	# Fix wrong path in pkgconfig files
	find $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig -type f -name '*.pc' \
	-exec sed -i -e 's/$(DEB_HOST_MULTIARCH)\/$(DEB_HOST_MULTIARCH)/$(DEB_HOST_MULTIARCH)/g' {} \;

	# Remove private stuff
	rm -rfv debian/tmp/usr/include/*/qt5/QtFeedback/*/QtFeedback/private/
	rm -fv $(CURDIR)/debian/tmp/usr/lib/*/qt5/mkspecs/modules/qt_lib_*_private.pri

	# Remove broken .cmake file
	rm -fv $(CURDIR)/debian/tmp/usr/lib/*/cmake/Qt5Feedback/Qt5Feedback_.cmake

	# Remove libtool-like files
	rm -f debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.la

override_dh_auto_test:
	# Copy missing qmldir file to have tests running successfully
	cp -a src/imports/feedback/qmldir qml/QtFeedback/
	cd tests ; qmake ; make
	cd tests ; xvfb-run -a make check QML2_IMPORT_PATH=../../../qml QT_PLUGIN_PATH=$(CURDIR)/plugins LD_LIBRARY_PATH=$(CURDIR)/lib

override_dh_auto_clean:
	dh_auto_clean
	if [ -d doc.dpkg-bak ]; then \
	    rm -Rfv doc/; \
	    mv doc.dpkg-bak doc; \
	fi
	for file in \
	     qml/QtFeedback/plugins.qmltypes \
	     qml/QtFeedback/qmldir \
	     src/feedback/QtFeedback.version.in \
	     ; \
	do \
	    rm -f "$${file}"; \
	done

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