#!/usr/bin/make -f

PACKAGE=freon@UshakovVasilii_Github.yahoo.com

%:
	dh $@

execute_before_dh_auto_build:
	glib-compile-schemas $(PACKAGE)/schemas

execute_before_dh_install:
	rm -f $(PACKAGE)/icons/material-icons/LICENSE

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