#!/usr/bin/make -f

configure: 
	dh_testdir

	qmake PREFIX=/usr


build: build-stamp

build-stamp: configure
	dh_testdir
	$(MAKE)
	touch $@

clean: 
	dh_testdir
	dh_testroot
	rm -f $(CURDIR)/build-stamp 
	-$(MAKE) distclean
	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	# Add here commands to install the package into debian/qthello.
#	$(MAKE) INSTALL_ROOT="$(CURDIR)"/debian/qtmobile-weather/usr install
	install -D -m 755 $(CURDIR)/mobile-weather $(CURDIR)/debian/qtmobile-weather/usr/bin/mobile-weather
	install -D -m 755 $(CURDIR)/src/mobile-weather.bin $(CURDIR)/debian/qtmobile-weather/usr/bin/mobile-weather.bin
	install -D -m 644 $(CURDIR)/mobileweather.desktop $(CURDIR)/debian/qtmobile-weather/usr/share/applications/hildon/mobileweather.desktop
	install -D -m 644 $(CURDIR)/resource/icon-weather.png $(CURDIR)/debian/qtmobile-weather/usr/share/pixmaps/icon-weather.png
	install -D -m 644 $(CURDIR)/src/mobileweather.ini $(CURDIR)/debian/qtmobile-weather/usr/share/applications/mobileweather.ini

# 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_installmenu
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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