#!/usr/bin/make -f

VERSION=$$(cat $(CURDIR)/share/github-backup-utils/version)

override_dh_auto_build:
	# generate manpages for ghe-backup, ghe-host-check and ghe-restore
	help2man $(CURDIR)/bin/ghe-backup -N -o $(CURDIR)/debian/ghe-backup.1 \
          -n "Take snapshots of all GitHub Enterprise data" \
          --version-string="ghe-backup $(VERSION)"
	help2man $(CURDIR)/bin/ghe-host-check -N -o $(CURDIR)/debian/ghe-host-check.1 \
          -n "Restores a GitHub instance from local backup snapshots" \
          --version-string="ghe-host-check $(VERSION)"
	help2man $(CURDIR)/bin/ghe-restore -N -o $(CURDIR)/debian/ghe-restore.1 \
          -n "Verify connectivity with the GitHub Enterprise Server host" \
          --version-string="ghe-restore $(VERSION)"

%:
	dh $@
