#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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

export DEB_BUILD_HARDENING=1
export DEB_BUILD_OPTIONS+=noopt
#
#include /usr/share/hardening-includes/hardening.make
#
export CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
export LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
DH_OPTION=-v

%:
	dh $@ --with systemd,autoreconf


# Add libsyncnft to package only if nftables frontend was built.
#
INSTALL_LIBSYNCNFT_FLAG =

override_dh_auto_build:
	dh_auto_build 
	dh clean 
	$(MAKE) clean && $(MAKE)

override_dh_auto_clean:

override_dh_auto_test:

override_dh_strip:

override_dh_auto_install:
	dh_auto_install
	install --mode=644 -D debian/rsyslog.d-csmgrd.conf debian/tmp/etc/rsyslog.d/30-csmgrd.conf
	install --mode=644 -D debian/csmgrd.conf debian/tmp/etc/systemd/system/csmgrd.service.d/csmgrd.conf

override_dh_installinit:
	dh_installinit --no-act

override_dh_shlibdeps:
	dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
