#!/usr/bin/make -f

VERSION = 5.2.11
CHECKOUT = d149ebf89050f1bb5c50c142d750b2bbdf8b0c9d
CHECKOUTDIR = fonts/google
FONT = merriweather

%:
	dh $@

get-orig-source:
	CURDIR=`pwd` && \
	TMPDIR=`mktemp -d /tmp/node-fontsource-$(FONT)-$(VERSION).XXXXXX` && \
	cd $$TMPDIR && \
	git clone https://github.com/fontsource/font-files.git --filter=blob:none --no-checkout --sparse font-files && \
	cd font-files && \
	git sparse-checkout init --cone && \
	git sparse-checkout add $(CHECKOUTDIR)/$(FONT) && \
	git checkout $(CHECKOUT) && \
	cd $(CHECKOUTDIR) && \
	tar -Jcf $$CURDIR/node-fontsource-$(FONT)_$(VERSION).orig.tar.xz $(FONT) && \
	rm -rf $$TMPDIR

.PHONY: get-orig-source
