aboutsummaryrefslogtreecommitdiff
path: root/debian/rules
blob: 12e46407e54e94ff278fd2fe041d35af4cf7405d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/make -f

export DH_VERBOSE=1

%:
	dh $@ --with=python3,systemd --buildsystem=pybuild

override_dh_systemd_enable:
	dh_systemd_enable prometheus-pgbouncer-exporter.service

override_dh_systemd_start:
	dh_systemd_start --restart-after-upgrade prometheus-pgbouncer-exporter.service

override_dh_auto_install:
	dh_auto_install
	# build the man page
	help2man -n "Export metrics from pgbouncer to Prometheus" --no-info \
		--version-option="-m prometheus_pgbouncer_exporter --version" \
		--help-option="-m prometheus_pgbouncer_exporter --help" \
		--output=prometheus-pgbouncer-exporter.1 python3
	# Remove the .TP on the 7th line to improve readability
	sed -i '7 d' prometheus-pgbouncer-exporter.1