#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

# This has to be exported to make some magic below work.
export DH_OPTIONS

%:
	dh $@ 

override_dh_install:
	dh_install --fail-missing

override_dh_auto_build:
	docbook-to-man doc/xnbd-client.1.sgml > debian/xnbd-client.1
	docbook-to-man doc/xnbd-server.8.sgml > debian/xnbd-server.8
	docbook-to-man doc/xnbd-bgctl.1.sgml > debian/xnbd-bgctl.1
	docbook-to-man doc/xnbd-watchdog.1.sgml > debian/xnbd-watchdog.1
	dh_auto_build

override_dh_clean:
	dh_clean
	rm -f debian/xnbd-client.1 debian/xnbd-server.8 debian/xnbd-bgctl.1 debian/xnbd-watchdog.1
