#!/usr/bin/make -f

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

config.status: 
	dh_testdir

build: build-stamp

build-stamp:  
	dh_testdir
	dpatch apply-all
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	dpatch deapply-all
	rm -rf debian/patched
	rm -rf builddir
	rm -f build-stamp 
	dh_clean

install: 
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	dh_install
	install -o root -g root -m 644 $(CURDIR)/modules/pixmaps/gtablix.xpm $(CURDIR)/debian/gtablix/usr/share/pixmaps/gtablix.xpm
#	install -o root -g root -m 644 $(CURDIR)/debian/gtablix.applications $(CURDIR)/debian/gtablix/usr/share/application-registry/gtablix.applications	
	dh_installdocs
	dh_installman
	dh_installmenu
	dh_desktop
	sh intltool.sh

binary-indep: install
	dh_testdir
	dh_testroot
	dh_installchangelogs CHANGES
	# fix
	#rm $(CURDIR)/debian/usr/share/doc/gtablix/CHANGES
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-arch: install

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