#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk
HASH=$(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/^.*\.//')

PACKAGE = $(shell dh_listpackages)
TMP     = $(CURDIR)/debian/$(PACKAGE)

%:
	dh $@

override_dh_auto_test:
    # there are no tests

get-orig-source:
	git clone https://github.com/citation-style-language/locales.git
	cd locales && \
	git archive --format=tar $(HASH) | \
		xz > ../../$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz
	rm -rf locales
	# possible alternative: `git deborig $(HASH)' (in devscripts >= 2.17.0)

gen-copyright:
	perl debian/gen-copyright
