#!/usr/bin/make -f

export DH_VERBOSE = 1

%:
	dh $@

override_dh_auto_install:
	# Install extension files from dist/
	install -d $(CURDIR)/debian/tilingshell-gnome-shell-extension/usr/share/gnome-shell/extensions/tilingshell@ferrarodomenico.com
	cp -r dist/* $(CURDIR)/debian/tilingshell-gnome-shell-extension/usr/share/gnome-shell/extensions/tilingshell@ferrarodomenico.com/

	# Install GSettings override
	install -d $(CURDIR)/debian/tilingshell-gnome-shell-extension/usr/share/glib-2.0/schemas
	install -m 644 debian/10_tilingshell.gschema.override $(CURDIR)/debian/tilingshell-gnome-shell-extension/usr/share/glib-2.0/schemas/

	# Install per-user update script
	install -d $(CURDIR)/debian/tilingshell-gnome-shell-extension/usr/lib/tilingshell-extension
	install -m 755 debian/tilingshell-update-user.sh $(CURDIR)/debian/tilingshell-gnome-shell-extension/usr/lib/tilingshell-extension/

	# Install autostart desktop file to /etc/skel
	install -d $(CURDIR)/debian/tilingshell-gnome-shell-extension/etc/skel/.config/autostart
	install -m 644 debian/tilingshell-extension-update.desktop $(CURDIR)/debian/tilingshell-gnome-shell-extension/etc/skel/.config/autostart/
