#!/usr/bin/make -f
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 -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON -DUSE_SUBMODULE=OFF -DCMAKE_CXX_FLAGS="-std=c++20 -fcoroutines -Wno-error=restrict -g"

override_dh_auto_install:
	dh_auto_install
	chrpath -d debian/tmp/usr/bin/drogon_ctl
