File: rules

package info (click to toggle)
qevercloud 3.0.3%2Bds-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 912 kB
  • sloc: cpp: 4,690; yacc: 486; makefile: 38
file content (65 lines) | stat: -rwxr-xr-x 2,118 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
#!/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
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

# Multiarch support
export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

# Set directory variables
_QEVERCLOUD_QT5_BUILDDIR = build-qt5
_QEVERCLOUD_GENERATOR_DIR = QEverCloudGenerator

%:
	dh $@ --buildsystem=cmake --builddirectory=$(_QEVERCLOUD_QT5_BUILDDIR)

custom_regenerate_from_thrift:
	(cd $(_QEVERCLOUD_GENERATOR_DIR); cmake .;)
	$(MAKE) -C $(_QEVERCLOUD_GENERATOR_DIR)
	mkdir -p QEverCloud/src/generated
	mkdir -p QEverCloud/headers/generated
	mv -t QEverCloud/src/generated \
	    $(_QEVERCLOUD_GENERATOR_DIR)/generated/generated/*.cpp \
	    $(_QEVERCLOUD_GENERATOR_DIR)/generated/generated/types_impl.h
	mv -t QEverCloud/headers/generated \
	    $(_QEVERCLOUD_GENERATOR_DIR)/generated/generated/*.h

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(_QEVERCLOUD_QT5_BUILDDIR)
	(cd $(_QEVERCLOUD_GENERATOR_DIR); $(MAKE) clean || true;)

override_dh_auto_configure: custom_regenerate_from_thrift
	# -DCMAKE_INSTALL_LIBDIR is not handled by debhelper now,
	# temporarily writing explicitly here to override. That line
	# should be re-analyzed and removed after debhelper bug #833789
	# get fixed.
	dh_auto_configure -- \
	        -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
	        -DUSE_QT5=1 -DUSE_QT5_WEBKIT=1

override_dh_auto_build:
	dh_auto_build
	# build documentation here for the -doc package
	$(MAKE) -C $(_QEVERCLOUD_QT5_BUILDDIR) doc
	$(MAKE) -C $(_QEVERCLOUD_QT5_BUILDDIR)/doc/latex
	mv build-qt5/doc/latex/refman.pdf build-qt5/doc/latex/qevercloud.pdf

override_dh_compress:
	# do not compress qevercloud.pdf, since few spaces can be squashed
	# and .pdf.gz file is hard to be opened by common pdf reader
	dh_compress -X.pdf --

override_dh_installdocs-indep:
	dh_installdocs --indep --
	# strip doxygen documents
	dh_doxygen

.PHONY: custom_regenerate_source_code

override_dh_missing:
	dh_missing --fail-missing