#!/usr/bin/make -f

%:
	dh $@ --with apache2,systemd

override_dh_auto_configure:
	perl ./tools/updt_embedded_rsc.pl
	dh_auto_configure

override_dh_auto_install:
	dh_auto_install
	# fix manpage section
	mv debian/pgcluu/usr/share/man/man1/pgcluu.1 debian/pgcluu/usr/share/man/man1/pgcluu.1p

override_dh_systemd_enable:
	# only enable data collection by default; pgcluu.service is not needed if the CGI is used
	dh_systemd_enable --no-enable pgcluu.service
	dh_systemd_enable --no-enable pgcluu.timer
	dh_systemd_enable pgcluu_collectd.service
