package=unidata

all: clean $(package).tgz

clean:
	rm -f $(package).tgz


$(package).tgz: *
	touch $(package).tgz
	cp brand_data.json $(package).json
	tar zcf $(package).tgz --exclude Makefile --exclude firmware --exclude $(package).json --exclude *.tgz -C .. $(package)
	md5="$$(md5sum *.tgz | cut -d ' ' -f1)" && sed -i '/"md5sum":/ s/"md5sum":[^,]*/"md5sum":"'$$md5'"/' $(package).json

