#!/usr/bin/make -f

DEB_PYTHON_SYSTEM=pysupport

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/python-distutils.mk

configure/debpartial-mirror::
	# Fill the vars
	sed -i "s/version_str = .*/version_str = '$(shell dpkg-parsechangelog | grep '^Version:' | awk '{ print $$2; }')'/g" debpartial-mirror
	sed -i "s/version = .*,/version = '$(shell dpkg-parsechangelog | grep '^Version:' | awk '{ print $$2; }')',/g" setup.py

build/debpartial-mirror::
	# Build the manual page
	docbook-to-man $(CURDIR)/debian/manpage.sgml > $(CURDIR)/debpartial-mirror.1

clean::
	rm -f	src/*.pyc tests/*.pyc \
		debpartial-mirror.1
