#!/usr/bin/make -f
# -*- makefile -*-

srcpkg_name = $(shell dpkg-parsechangelog | grep '^Source' | cut -d ' ' -f 2,2)
upstream_version = $(shell dpkg-parsechangelog | grep '^Version' | cut -d ' ' -f 2,2 |cut -d '-' -f 1,1)


# one ring to rule them all ...
%:
	dh $@ --with python2

override_dh_installman:
	PYTHONPATH=build/lib:$(PYTHONPATH) help2man -N \
		-n "query the CRS 'OptiCAL' photometer" ./pyoptical > build/pyoptical.1
	dh_installman build/pyoptical.1

override_dh_clean:
	-rm -rf build
	dh_clean

get-orig-src:
	wget -O $(srcpkg_name)_$(upstream_version).orig.tar.gz \
		http://github.com/esc/pyoptical/tarball/$(upstream_version)
