#!/usr/bin/make -f

BUILDDIR = build_dir

# secondly called by launchpad
build:
	rm -rf $(BUILDDIR)
	meson setup $(BUILDDIR) --prefix=/usr --destdir=./debian/tmp -DGSETTINGS_COMPILE=OFF -DICON_UPDATE=OFF
	ninja -C $(BUILDDIR)


# thirdly called by launchpad
binary: binary-indep binary-arch

binary-indep:
	# nothing to be done

binary-arch:
	ninja -C $(BUILDDIR)/_build install
	mkdir -p ./debian/tmp/DEBIAN
	mv $(BUILDDIR)/debian/tmp/* ./debian/tmp
	dpkg-gencontrol -p%(PROJECT_NAME);
	dpkg --build debian/tmp ..

# firstly called by launchpad
clean:
	rm -f build
	rm -rf $(BUILDDIR)

.PHONY: binary binary-arch binary-indep clean
