#!/usr/bin/make -f
# GNU copyright 1997 to 1999 by Joey Hess.

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

build: build-stamp
build-stamp:
	dh_testdir

	./configure --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
	# Add here commands to compile the package.
	#$(MAKE)

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	-rm po/*.gmo po/stamp-po

	# clean up after the build process.
	[ ! -f Makefile ] || $(MAKE) clean
	[ ! -f Makefile ] || $(MAKE) distclean

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs -pgworldclock
	$(MAKE)
	$(MAKE) install DESTDIR=`pwd`/debian/tmp/

# Build architecture-independent files here.
binary-indep: 
	dh_testdir
	dh_testroot
	dh_installdirs -ptzwatch
	dh_install  -ptzwatch
	dh_installman -ptzwatch tzwatch.1
	dh_installdocs -ptzwatch README
	dh_installchangelogs -ptzwatch ChangeLog
	dh_compress -ptzwatch
	dh_fixperms -ptzwatch
	dh_installdeb -ptzwatch
	dh_gencontrol -ptzwatch
	dh_md5sums -ptzwatch
	dh_builddeb -ptzwatch

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdirs -pgworldclock
	uudecode debian/gworldclock.png.uuencode
	dh_install -pgworldclock
	rm debian/gworldclock.png
	dh_installdocs -pgworldclock
	dh_installmenu -pgworldclock
	dh_installman -pgworldclock gworldclock.1
	dh_installchangelogs  -pgworldclock ChangeLog
	dh_link -pgworldclock
	dh_desktop -pgworldclock
	dh_strip -pgworldclock
	dh_compress -pgworldclock
	dh_fixperms -pgworldclock
	dh_installdeb -pgworldclock
	dh_shlibdeps -pgworldclock
	dh_gencontrol -pgworldclock
	dh_md5sums -pgworldclock
	dh_builddeb -pgworldclock

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