#!/usr/bin/make -f

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

# This has to be exported to make some magic below work.
export DH_OPTIONS

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

%:
	dh $@ --with kodiaddon

override_dh_auto_configure:
	dh_auto_configure -- -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/kodi

override_dh_installdocs:
	dh_installdocs --link-doc=kodi-pvr-mediaportal-tvserver

override_dh_auto_install:
	dh_auto_install
	rm $(CURDIR)/debian/kodi-pvr-mediaportal-tvserver/usr/share/kodi/addons/pvr.mediaportal.tvserver/LICENSE.txt

override_dh_makeshlibs:
	dh_makeshlibs -n
