#!/usr/bin/make -f

# Set to enable verbose output from debhelper
#export DH_VERBOSE=1

install_dir = debian/gtml

%:
	dh $@

override_dh_installdocs:
	dh_installdocs README

override_dh_installexamples:
	dh_installexamples src/*

override_dh_installman:
	dh_installman gtml.1

override_dh_compress:
	dh_compress -X.gtm

override_dh_installdirs:
	dh_installdirs usr/bin usr/share/doc/gtml/html

# This takes the place of an upstream install process
override_dh_auto_install:
	install -p gtml $(install_dir)/usr/bin
	install -p -m 644       \
           index.html      \
           gtml_ref.html   \
           CREDITS.html    \
           NEWS.html       \
           new.gif         \
			  $(install_dir)/usr/share/doc/gtml/html

# This takes the place of an upstream build process
override_dh_auto_build:
	pod2man --center='Debian GNU/Linux' --release='gtml 3.5.4' debian/gtml.pod > gtml.1

# This takes the place of an upstream clean process
override_dh_auto_clean:
	rm -f gtml.1

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	sh debian/smoketest
endif

