#!/usr/bin/make -f

VERSION = 5.1.1
CHECKOUT = 73c50b3f501c393b11cf5f6415cdc2b3f702be5b
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
