#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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




CFLAGS = -Wall -g

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif


build:
	dh_testdir
	cd src && lrelease src.pro && qmake src.pro
	qmake ifp_gui.pro
	make

clean:
	dh_testdir
	dh_testroot
	-$(MAKE) clean
	dh_clean
	-rm -rf bin
	-rm Makefile src/Makefile 

binary-arch: build
	dh_testdir
	dh_testroot
	dh_clean 
	dh_installdirs usr/bin usr/share/qt3/translations usr/share/applications
	dh_install src/translations/*.qm usr/share/qt3/translations
	dh_install bin/ifp_gui usr/bin
	dh_install ifp_gui.desktop usr/share/applications
	dh_installchangelogs CHANGELOG
	dh_installdocs ifp_gui.faq README
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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

get-orig-source:
	wget http://optusnet.dl.sourceforge.net/sourceforge/ifpgui/ifp_gui-0.10.5.tar.gz && mv