#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@  --with python2

override_dh_clean:
	dh_clean
	rm -rf doc/build/*

UPSTREAM_GIT=git://github.com/gholt/swauth.git
DEBIAN_NAME=swauth
DEBIAN_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')

get-orig-source:
	git clone $(UPSTREAM_GIT) $(DEBIAN_NAME).src
	cd $(DEBIAN_NAME).src ; \
		git archive master --format=tar.gz \
			--output=$(DEBIAN_NAME)_$(DEBIAN_VERSION).orig.tar.gz \
			--prefix=$(DEBIAN_NAME)-$(DEBIAN_VERSION)/
	rm -rf $(DEBIAN_NAME).src
