#!/usr/bin/make -f

DESTDIR = debian/xdg-desktop-portal-cosmic
CLEAN ?= 1
VENDOR ?= 1

%:
	dh $@

override_dh_auto_clean:
ifeq ($(CLEAN),1)
	just clean
endif
ifeq ($(VENDOR),1)
	if ! ischroot; then \
		just vendor; \
	fi
endif

override_dh_auto_build:
	just vendor=$(VENDOR) build

override_dh_auto_install:
	just rootdir=$(DESTDIR) install
