#!/usr/bin/make -f
export DEB_BUILD_HARDENING=1
#export DEB_BUILD_HARDENING_DEBUG=1

%:
	dh $@ --parallel

override_dh_auto_configure:
	./configure --prefix=/usr --qtdir=/usr/share/qt4/ --disable-bundled-qca --no-separate-debug-info # --enable-debug

override_dh_icons:
	mkdir -p $(CURDIR)/debian/psi/usr/share/pixmaps
	cp debian/psi.xpm $(CURDIR)/debian/psi/usr/share/pixmaps/
	dh_icons

override_dh_clean:
	dh_clean
	-rm conf.log
	-rm conf.pri
	-rm iris/conf.pri
	-rm iris/lib/libiris.a
	-rm iris/lib/libiris.prl
	-rm iris/lib/libirisnet.a
	-rm iris/lib/libirisnet.prl
	-rm psi
	-rm src/config.h


#configure: configure-stamp
#configure-stamp:
#	dh_testdir
#	# Add here commands to configure the package.
#	
#
#	touch configure-stamp
#
#build: configure-stamp build-stamp
#build-stamp:
#	dh_testdir
#
#	# Add here commands to compile the package.
#	./configure --prefix=/usr --qtdir=/usr/share/qt4/ --disable-bundled-qca --no-separate-debug-info # --enable-debug
#	$(MAKE) 
#	#/usr/bin/docbook-to-man debian/psi.sgml > psi.1
#
#	touch build-stamp
#
#clean:
#	dh_testdir
#	dh_testroot
#	rm -f build-stamp configure-stamp
#
#	# Add here commands to clean up after the build process.
#	[ ! -f Makefile ] || $(MAKE) distclean
#	-rm src/Makefile
#	-rm Makefile
#	-rm libpsi/psiwidgets/Makefile
#	-rm src/psi
#	-rm conf.pri
#	-rm extra.pri
#	-rm conf.log
#	-rm src/config.h
#	-rm src/.qmake.internal.cache
#	-rm psi
#
#	dh_clean
#
#install: build
#	dh_testdir
#	dh_testroot
#	dh_clean -k
#	dh_installdirs
#
#	# Add here commands to install the package into debian/psi.
#	$(MAKE) install INSTALL_ROOT=$(CURDIR)/debian/psi
#
#	mkdir -p $(CURDIR)/debian/psi/usr/share/doc/psi
#	mkdir -p $(CURDIR)/debian/psi/usr/share/lintian/overrides/
#	mkdir -p $(CURDIR)/debian/psi/usr/share/pixmaps
#
#	ln -sf ../../psi/README $(CURDIR)/debian/psi/usr/share/doc/psi/README
#	cp ./debian/lintian-override $(CURDIR)/debian/psi/usr/share/lintian/overrides/psi
#	cp ./psi.xpm $(CURDIR)/debian/psi/usr/share/pixmaps
#
## Build architecture-independent files here.
#binary-indep: build install
## We have nothing to do by default.
#
## Build architecture-dependent files here.
#binary-arch: build install
#	dh_testdir
#	dh_testroot
##	dh_installdebconf	
#	dh_installdocs
#	dh_installexamples
#	dh_installmenu
##	dh_installlogrotate
##	dh_installemacsen
##	dh_installpam
##	dh_installmime
##	dh_installinit
##	dh_installcron
#	dh_installman
##	dh_installinfo
##	dh_undocumented
#	dh_installchangelogs
#	dh_icons
#	dh_link
#	dh_strip
#	dh_compress
#	dh_fixperms
##	dh_makeshlibs
#	dh_installdeb
##	dh_perl
#	dh_shlibdeps
#	dh_gencontrol
#	dh_md5sums
#	dh_builddeb
#
#binary: binary-indep binary-arch
#.PHONY: build clean binary-indep binary-arch binary install configure
