#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules for cdbfasta
# Author: Tim Booth <tbooth@ceh.ac.uk>

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/buildtools.mk

%:
	dh $@

override_dh_auto_build:
	dh_auto_build -- LINKER="$(CXX) $(LDFLAGS)"

override_dh_installman:
	help2man --no-info --no-discard-stderr --version-option=-v ./cdbfasta |\
	    sed 's/^Invalid argument:.*//' |\
	    sed 's/manual page for cdbfasta version .*/Creates an index file for records from a multi-fasta file./' \
	    > $(CURDIR)/debian/`dh_listpackages`/usr/share/man/man1/cdbfasta.1
	help2man --no-info --no-discard-stderr --version-option=-v ./cdbyank |\
	    sed 's/^Invalid argument:.*//' |\
	    sed 's/manual page for cdbyank version .*/Query an index file created with cdbfasta./' \
	    > $(CURDIR)/debian/`dh_listpackages`/usr/share/man/man1/cdbyank.1
