#!/usr/bin/make -f
# -*- makefile -*-

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

# Extract the current version number and package name
DEBIAN  := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1)
VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
name := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')

QMAKE_GENERIC := \
		LIBS+=-lz \
		VERSION=$(VERSION)

%:
	dh $@ --buildsystem=qmake_qt4 --parallel --dbg-package=libquazip0-dbg
	

override_dh_auto_configure:
	dh_auto_configure -- $(QMAKE_GENERIC) $(extra_configure_opts)

override_dh_auto_clean:
	rm -Rf quazip/.obj
	rm -Rf quazip/.moc
	find . -name Makefile -delete
	dh_auto_clean

override_dh_auto_install:
	dh_auto_install -Smakefile -- INSTALL_ROOT=$(CURDIR)/debian/tmp

