aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2016-02-17 11:12:11 +0000
committerChristopher Baines <mail@cbaines.net>2016-02-17 11:44:01 +0000
commitde7913f18338b4e64063832b3dba6dfbeda6f69b (patch)
treed381eaff28a4a6aeb4220a1ab57fb60caae598f8
parent0549032f0756e73ea155eeb89dd01117603cd5cb (diff)
downloadprometheus-pgbouncer-exporter-de7913f18338b4e64063832b3dba6dfbeda6f69b.tar
prometheus-pgbouncer-exporter-de7913f18338b4e64063832b3dba6dfbeda6f69b.tar.gz
Generate a manpage using help2man
-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