#!/usr/bin/make -f

%:
	dh $@

override_dh_auto_build:
	glib-compile-schemas --strict --targetdir=schemas/ schemas
	dh_auto_build

override_dh_install:
	# Installing translations
	for mo in $$(cd locale; ls */*/*.mo); do \
		lang=$$(dirname $$mo); \
		mkdir -p debian/$(PKG)/usr/share/locale/$$lang; \
		cp locale/$$mo debian/$(PKG)/usr/share/locale/$$lang/gnome-shell-extension-suspend-button.mo; \
	done
	# do not install the xml file
	dh_install -Xschemas/org.gnome.shell.extensions.suspend-button.gschema.xml
	find . -name org.gnome.shell.extensions.suspend-button.gschema.xml -delete
