#!/usr/bin/make -f

PACKAGE 	= cloc
BIN		= $(PACKAGE)
BINDIR  	= debian/$(PACKAGE)/usr/bin
DOCDIR  	= debian/$(PACKAGE)/usr/share/doc/$(PACKAGE)/doc
CHANGELOG 	= debian/upstream.changelog

# Run manaually to get an update
get-changelog:
	svn log https://svn.code.sf.net/p/cloc/code | \
		sed 's/[[:space:]]*$$//' \
		> $(CHANGELOG)

override_dh_auto_build:
	# If packaged directly from upstream VCS tree
	[ -f $(PACKAGE).1 ] || $(MAKE) man

override_dh_auto_install:
	install -D -m 755 $(BIN) $(BINDIR)/$(PACKAGE)

override_dh_installchangelogs:
	dh_installchangelogs $(CHANGELOG)

binary: binary-indep

%:
	dh  $@

.PHONY: get-changelog

# End of file
