#!/usr/bin/make -f

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

override_dh_auto_configure:
	dh_auto_configure -- --prefix=/opt/vyatta --sysconfdir=/opt/vyatta/etc

# verbose output of unittest logs
override_dh_auto_test:
	dh_auto_test -- VERBOSE=1

# *.yang files and related templates are distributed via debian install files
override_dh_auto_install:
	dh_auto_install --destdir=debian/vyatta-syslog
	mkdir -p debian/tmp/usr/share
	mv debian/vyatta-syslog/usr/share/configd debian/tmp/usr/share

override_dh_install:
	dh_install
	mkdir -p debian/vyatta-system-syslog-v1-yang/lib/systemd/system/rsyslog.service.d
	install --mode=644 debian/vyatta-syslog-snmptrap.conf \
		debian/vyatta-system-syslog-v1-yang/lib/systemd/system/rsyslog.service.d

%:
	dh $@ --with autoreconf --with systemd --with=yang --with=config-package
