#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@

override_dh_autoreconf:
	dh_autoreconf -X./COPYING

ver := 0.0.20000620
pkg := ncbi-seg

get-orig-source:
	set -e; \
	t=$$(mktemp -d) || exit 1; \
	trap "rm -rf -- '$$t'" EXIT; \
	d="$$t/$(pkg)-$(ver).orig"; \
	mkdir "$$d"; \
	( cd "$$d"; \
	wget \
		ftp://ftp.ncbi.nih.gov/pub/seg/seg/README\
		ftp://ftp.ncbi.nih.gov/pub/seg/seg/genwin.c\
		ftp://ftp.ncbi.nih.gov/pub/seg/seg/genwin.h\
		ftp://ftp.ncbi.nih.gov/pub/seg/seg/hiseg.c\
		ftp://ftp.ncbi.nih.gov/pub/seg/seg/lnfac.h\
		ftp://ftp.ncbi.nih.gov/pub/seg/seg/makefile\
		ftp://ftp.ncbi.nih.gov/pub/seg/seg/seg.c\
		ftp://ftp.ncbi.nih.gov/pub/seg/seg/seg.doc; \
	); \
	GZIP="--best --no-name" tar --owner=root --group=root --mode=a+rX -caf "./$(pkg)_$(ver).orig.tar.gz" -C "$$t" "$(pkg)-$(ver).orig"

