#!/usr/bin/make -f

DHFLAGS=--buildsystem=cmake
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ $(DHFLAGS)

override_dh_auto_build:
	dh_auto_build $(DHFLAGS)

override_dh_install:
	dh_install --list-missing

override_dh_auto_configure:
	dh_auto_configure $(DHFLAGS) -- \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DENABLE_BUDGIE=ON \
		-DENABLE_MATE=ON \
		-DENABLE_VALAPANEL=ON \
		-DENABLE_XFCE=ON \
		-DMAKE_BOLD_APPNAME=ON \
		-DCMAKE_INSTALL_LIBEXECDIR=/usr/lib

override_dh_auto_install:
	dh_auto_install
	mkdir -p $(CURDIR)/debian/tmp/usr/lib/budgie-desktop/plugins/appmenu-budgie
	mv $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/budgie-desktop/plugins/budgie-vala-panel-appmenu-plugin/* $(CURDIR)/debian/tmp/usr/lib/budgie-desktop/plugins/appmenu-budgie

override_dh_makeshlibs:
	dh_makeshlibs -Xbudgie -Xmate -Xvala-panel -Xxfce4

get-orig-source:
	uscan --noconf --force-download --rename --download-current-version --destdir=..
