#!/usr/bin/make -f

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

%:
	dh $@

override_dh_auto_install:
	dh_auto_install
	DESTDIR=$(CURDIR)/debian/collectl ./INSTALL
	rm -f $(CURDIR)/debian/collectl/usr/share/doc/collectl/html/COPYING \
	      $(CURDIR)/debian/collectl/usr/share/doc/collectl/html/ARTISTIC\
	      $(CURDIR)/debian/collectl/usr/share/doc/collectl/html/GPL

override_dh_installsystemd:
	dh_installsystemd --name=collectl collectl.service --no-start

override_dh_installinit:
	dh_installinit --no-start

override_dh_fixperms:
	dh_fixperms
	chmod 644 $(CURDIR)/debian/collectl/usr/lib/systemd/system/collectl.service
	chmod 644 $(CURDIR)/debian/collectl/usr/share/collectl/envrules.std
