#!/usr/bin/make -f

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

PACKAGE=hopes
PROGPATH=usr

build: build-stamp
build-stamp:
	dh_testdir
	$(MAKE)
	# Add here commands to compile the package.
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp

	# Add here commands to clean up after the build process.
	if [ -x setup ] && [ -e .setup-config ] ; then ./setup clean ; fi
	rm -rf setup Setup.hi Setup.ho Setup.o .*config* dist html
	$(MAKE) clean

	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs -a 
	
	# Add here commands to install the package into debian/tmp
	./setup copy --copy-prefix=$(CURDIR)/debian/$(PACKAGE)/$(PROGPATH)

build-indep: build-indep-stamp
build-indep-stamp:
	dh_testdir

install-indep: build-indep
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs -i

	# Add here commands to install the package into debian/tmp
	dh_haskell -i

# Build architecture-independent files here.
binary-indep: build-indep install-indep
	dh_testdir
	dh_testroot
	dh_installchangelogs -i
	dh_installdocs -i
	dh_installexamples -i
	dh_installman -i
	dh_link -i
	dh_strip -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_shlibdeps -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs -a
	dh_installdocs -a
	dh_installexamples -a
	dh_installman -a
	dh_link -a
	dh_strip -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

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