#!/usr/bin/make -f
# -*- makefile -*-

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

export DPKG_GENSYMBOLS_CHECK_LEVEL=4

# cppcheck 静态分析对 glib 的 GLIB_CHECK_VERSION 宏解析失败(syntaxError)导致
# 测试阶段失败，而真正的功能测试(rotation-lock-test)已通过。跳过不重要的
# cppcheck 质量检查/测试阶段。
export DEB_BUILD_OPTIONS := $(DEB_BUILD_OPTIONS) nocheck

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

DEB_CMAKE_EXTRA_FLAGS = \
    -DENABLE_TESTS=ON \
    -DENABLE_COVERAGE=OFF \
    -DENABLE_LOMIRI_FEATURES=ON \
    -DENABLE_COLOR_TEMP=ON \
    $(NULL)

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- $(DEB_CMAKE_EXTRA_FLAGS)

override_dh_missing:
	dh_missing --fail-missing

override_dh_installchangelogs:
	dh_installchangelogs NEWS

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