#!/usr/bin/make -f

#Rodney Dawes Version simplifies things :)

DH_CMAKE_BUILD_DIR=obj	-${DEB_BUILD_GNU_TYPE}
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_HOST_ARCH_OS   ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)

CMAKE_OPTS=
ifneq ($(DEB_HOST_ARCH_OS),linux)
CMAKE_OPTS+= -DWANT_ALSA=0
endif

%:
	dh $@ --buildsystem cmake

override_dh_auto_configure:
	dh_auto_configure -- -DCMAKE_INSTALL_LIBDIR=lib/$(DEB_HOST_MULTIARCH) $(CMAKE_OPTS)
