aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/control5
-rwxr-xr-xdebian/rules10
2 files changed, 15 insertions, 0 deletions
diff --git a/debian/control b/debian/control
index 0219610..19eedd2 100644
--- a/debian/control
+++ b/debian/control
@@ -6,8 +6,13 @@ Homepage: http://git.cbaines.net/prometheus-pgbouncer-exporter/
Build-Depends: debhelper (>= 9),
dh-systemd,
dh-python,
+ help2man,
python3-all,
python3-setuptools,
+# Used when generating the manpage
+ python3-psycopg2,
+ python3-configargparse,
+ python3-prometheus-client,
Standards-Version: 3.9.6
X-Python3-Version: >= 3.2
diff --git a/debian/rules b/debian/rules
index b06eef5..12e4640 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,3 +10,13 @@ override_dh_systemd_enable:
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