#!/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

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND  = -fno-strict-aliasing -Wno-error=format-security -Wno-error=stringop-overflow -Wno-error=nonnull
export DEB_CFLAGS_MAINT_APPEND  = -fno-strict-aliasing 
# package maintainers to append LDFLAGS
export DEB_LDFLAGS_MAINT_APPEND =

PACKAGE = argus-client

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

%:
	dh ${@} 

override_dh_auto_configure:
	touch .threads
	dh_auto_configure -- --with-maxminddb 

override_dh_autoreconf:
	# don't do this

override_dh_auto_install:
	chmod -x support/Config/racolor.conf
	find $(TMP) -type f -name ._\* -exec rm {} \;

override_dh_installsystemd:
	# Do not start/enable by default on purpose.
	# The user should start it only after making sure the configuration is
	# appropriate for his/her computer.
	dh_installsystemd --no-enable --no-start --name radium
	dh_installsystemd --no-enable --no-start --name rasplit
