#!/usr/bin/make -f

%:
	dh $@

execute_after_dh_auto_install:
	mv debian/gnome-shell-extension-gamemode/usr/share/locale \
	   debian/gnome-shell-extension-gamemode/usr/share/gnome-shell/extensions/gamemodeshellextension@trsnaqe.com/

override_dh_gencontrol:
	dh_gencontrol -- \
		-Vgnome:MinimumVersion=$(shell python3 -c "import json; print(min(int(x) for x in json.load(open('metadata.json', 'rt'))['shell-version']))") \
		-Vgnome:MaximumVersion=$(shell python3 -c "import json; print(1+max(int(x) for x in json.load(open('metadata.json', 'rt'))['shell-version']))")
