#!/usr/bin/make -f
#
# (C) 1998-2014 Roland Rosenfeld <roland@debian.org>, based on
# sample debian/rules that uses debhelper. 
# This file is public domain software, originally written by Joey Hess.
#
# This version is for packages that are architecture independent.

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

debroot = `pwd`/debian/post-faq

%:
	dh $@

override_dh_auto_build:
	$(MAKE) -f Makefile.base config.dat
	$(MAKE) -f Makefile.base Makefile
	$(MAKE)

override_dh_clean:
	dh_clean
	[ ! -f Makefile ] || $(MAKE) clean
	rm -f config.dat

override_dh_auto_install:
	install -m 0755 post_faq.pl $(debroot)/usr/bin/post_faq
	install -m 0644 faqfile.pl $(debroot)/usr/share/post-faq/faqfile.pl
	sed -e 's/post_faq\.pl/post_faq/g' post_faq.man \
		> $(debroot)/usr/share/man/man1/post_faq.1
