#!/usr/bin/make -f
export DEB_CXXFLAGS_MAINT_APPEND = -std=c++20 -fcoroutines
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

DH_VERBOSE = 1
# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

%:
	dh $@ --with=cmake

override_dh_auto_configure:
	dh_auto_configure -- -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DUSE_SUBMODULE=OFF -DCMAKE_SKIP_INSTALL_RPATH=ON

override_dh_installexamples:
	dh_installexamples
	find debian/drogon/usr/share/doc/drogon/examples -name '.gitignore' -delete
	chmod -x debian/drogon/usr/share/doc/drogon/examples/CMakeLists.txt
