#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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

#cflags="-Wall -O2"
#
#ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
#  cflags +=" -g"
#endif

configure: 
	dh_testdir
#	$(MAKE) -f /usr/share/quilt/quilt.make patch
	# Add here commands to configure the package.
#	./configure --prefix=/opt/maemo/usr --mandir=\$${prefix}/share/man LDFLAGS="-Wl,--as-needed -Wl,-z,defs"

build: configure 
	dh_testdir
	# Add here commands to compile the package.
#	qmake hymns.pro
	$(MAKE) 

clean:
	dh_testdir
	dh_testroot

	# Add here commands to clean up after the build process.
	make clean
	rm -f hymns
	dh_clean

dest=$(CURDIR)/debian/hymns

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	$(MAKE) install DESTDIR=$(dest)

# 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_install
	dh_installdocs
#	dh_installman
#	dh_installchangelogs NEWS
#	mv $(dest)/usr/share/doc $(dest)/opt/maemo/usr/share/
	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
