#!/usr/bin/make -f

build:

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	dh_clean

binary-arch: build

binary-indep: build
	dh_testdir
	dh_testroot
	dh_clean
	dh_install dpkg-repack usr/bin
	dh_installdocs README
	dh_installexamples
	dh_installman dpkg-repack.1
	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
	dh_perl
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null |grep Version:`" : '.*Version: \(.*\)')

# Update the web page. Not intended for use by anyone except the author.
DIR=/home/web/kitenet.net/programs/dpkg-repack
installhook:
	cp debian/changelog $(DIR)/CHANGES
	echo -n $(VERSION) > $(DIR)/LATEST-VERSION-IS

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary dist
