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

clean:
	dh_testdir
	dh_testroot
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	# Add here commands to install the package into debian/tourney-manager.
	cp $(CURDIR)/tourney.pl $(CURDIR)/debian/tourney-manager/usr/games/tourney-manager
	cp $(CURDIR)/crosstable.pl $(CURDIR)/debian/tourney-manager/usr/games/crosstable
	cp $(CURDIR)/Crosstable.pm $(CURDIR)/debian/tourney-manager/usr/share/tourney-manager/Crosstable.pm
	cp $(CURDIR)/Tourney.pm $(CURDIR)/debian/tourney-manager/usr/share/tourney-manager/Tourney.pm
	cp $(CURDIR)/ChangeLog $(CURDIR)/debian/tourney-manager/usr/share/doc/tourney-manager/changelog
	cp $(CURDIR)/engine-engine-match.pl $(CURDIR)/debian/tourney-manager/usr/games/engine-engine-match
	
# Noting to d here
binary-arch: build install


# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_installexamples
	dh_install
	dh_installman $(CURDIR)/debian/tourney-manager.6 $(CURDIR)/debian/crosstable.6 $(CURDIR)/debian/engine-engine-match.6
	dh_link
	dh_strip
#	dh_compress $(CURDIR)/debian/tourney-manager/usr/share/doc/tourney-manager/changelog $(CURDIR)/debian/tourney-manager/usr/share/doc/tourney-manager/changelog.Debian
	dh_compress
	dh_fixperms
	dh_perl
#	dh_makeshlibs
	dh_installdeb
#	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
