#!/usr/bin/make -f

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

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/qmake.mk

DEB_BUILD_PARALLEL:=1
HASQT5=$(shell qmake -qt5 -v > /dev/null 2>&1 && echo yes)

ifeq ($(HASQT5),yes)
    QMAKE=qmake -qt5
    RUNTIME_DEPENDS=libqt5sql5-sqlite,\
	gstreamer1.0-plugins-base,\
	gstreamer1.0-plugins-good,\
	gstreamer1.0-plugins-ugly,\
	gstreamer1.0-plugins-bad,\
	gstreamer1.0-pulseaudio
else
    QMAKE=qmake-qt4
    RUNTIME_DEPENDS=libqt4-sql-sqlite,\
	gstreamer0.10-plugins-base,\
	gstreamer0.10-plugins-good,\
	gstreamer0.10-plugins-ugly,\
	gstreamer0.10-plugins-bad,\
	gstreamer0.10-pulseaudio
endif
CFLAGS=-O3
CXXFLAGS=-O3
DEB_DH_GENCONTROL_ARGS_ALL = -- '-Vruntime:Depends=$(RUNTIME_DEPENDS)'
