#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
override_dh_install:
	mkdir -p debian/precast-shortlog-parser
	rm -f debian/precast-shortlog-parser/* 2>&1 > /dev/null
	mkdir -p debian/precast-shortlog-parser/opt/precast-shortlog-parser debian/precast-shortlog-parser/var/log/so-logs debian/precast-shortlog-parser/usr/share/plotnik_collector/checks
	cp *.py *.sh *.awk ../common.py ../so_log_tail.py ../mongodb.py debian/precast-shortlog-parser/opt/precast-shortlog-parser/
	sed -i "s#LOGS_FOLDER = '/logs'#LOGS_FOLDER = '/var/log/so-logs'#" debian/precast-shortlog-parser/opt/precast-shortlog-parser/so_log_tail.py
	sed -i "s#STATE_FOLDER = '/state'#STATE_FOLDER = '/tmp'#" debian/precast-shortlog-parser/opt/precast-shortlog-parser/so_log_tail.py
	mv debian/precast-shortlog-parser/opt/precast-shortlog-parser/parse_plotnik_shortlog_*.sh debian/precast-shortlog-parser/usr/share/plotnik_collector/checks/
%:
	dh $@
