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

%:
	dh $@ --with python3

override_dh_auto_build:
	dh_auto_build
	pod2man --section=8 $(CURDIR)/collect-reminders > $(CURDIR)/collect-reminders.8
	pod2man $(CURDIR)/send-reminders > $(CURDIR)/send-reminders.1

override_dh_auto_install:
	dh_auto_install
	mv $(CURDIR)/debian/email-reminder/usr/bin/collect-reminders $(CURDIR)/debian/email-reminder/usr/sbin/
	mv $(CURDIR)/debian/email-reminder/usr/share/perl5/EmailReminder/*.py $(CURDIR)/debian/email-reminder/usr/lib/python3/dist-packages/EmailReminder/
	rm -f $(CURDIR)/debian/email-reminder/usr/share/man/man1/collect-reminders.1p
	chmod u+w $(CURDIR)/debian/email-reminder/usr/bin/* $(CURDIR)/debian/email-reminder/usr/sbin/*

override_dh_auto_test:

override_dh_installdeb:
	dh_installsysusers
	dh_installdeb

override_dh_installsystemd:
	dh_installsystemd --no-start
