#!/usr/bin/make -f

export DH_OPTIONS

%:
	dh  $@

v=$(shell dpkg-parsechangelog |sed -ne 's/^Version: \(\([0-9]\+\):\)\?\(.*\)-.*/\3/p')
get-orig-source:
	rm -rf igv_$v.orig
	cd .. && wget -c http://www.broadinstitute.org/igvdata/downloads/IGVDistribution_$v.zip
	unzip -qo ../IGVDistribution_$v.zip
	mv IGVDistribution_$v igv_$v.orig
	rm -rf igv.jar igv_$v.orig/native
	cd igv_$v.orig/lib && rm -f Jama-* batik* colt* commons-math-* commons-net-* concurrent* jargs* jhdf* junit-* log4j-* sam-* swing-layout-* xml-apis-*
	BZIP2=--best tar cjf ../igv_$v.orig.tar.bz2 igv_$v.orig
	rm -rf igv_$v.orig
