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

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

%:
	dh $@ --with python2 --buildsystem=python_distutils

override_dh_installpam:
	dh_installpam --name=caldav

# compat 9 does not run dh_installsystemd automatically. dh_installinit still
# ships /etc/default/calendarserver; dh_installsystemd installs the .service
# unit. It is left disabled and not started on install (as the SysV init was
# effectively opt-in via start_calendarserver) so the admin enables it only
# after configuring the database.
override_dh_installinit:
	dh_installinit
	dh_installsystemd --no-enable --no-start

override_dh_install:
	dh_install
	mv $(CURDIR)/debian/calendarserver/etc/caldavd/augments-default.xml $(CURDIR)/debian/calendarserver/etc/caldavd/augments.xml

override_dh_clean:
	dh_clean
	rm -f calendarserver/version.py
	rm -rf CalendarServer.egg-info
