File debian.rules of Package libquentier-development

#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=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)

# Required to make the tests work on launchpad
export LIBQUENTIER_PERSISTENCE_STORAGE_PATH = /tmp/libquentier_persistence_storage_path

# Build info
export LIBQUENTIER_BUILD_INFO = "OpenSUSE build service, unstable. $(shell date --utc '+%Y-%m-%d %H:%M') UTC"

_LIBQUENTIER_QT5_BUILDDIR = build-qt5

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

override_dh_auto_clean:
	dh_auto_clean

override_dh_auto_configure:
	dh_auto_configure -- -DLIB_QUENTIER_BUILD_INFO=${LIBQUENTIER_BUILD_INFO} -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH) -DCMAKE_BUILD_TYPE=RelWithDebInfo

override_dh_auto_build:
	dh_auto_build
	# build documentation for Qt5 version
	$(MAKE) -C build-qt5 doc
	$(MAKE) -C build-qt5/doc/latex
	mv build-qt5/doc/latex/refman.pdf build-qt5/doc/latex/libquentier.pdf
	# build translations (it's enough to do that only for Qt5 version)
	$(MAKE) -C build-qt5 lupdate
	$(MAKE) -C build-qt5 lrelease

override_dh_compress:
	# do not compress libquentier.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

override_dh_auto_test:
	xvfb-run -a dh_auto_test

override_dh_auto_install:
	dh_auto_install

override_dh_install:
	dh_install --list-missing
openSUSE Build Service is sponsored by