#!/usr/bin/make -f

# DEB_PYTHON_SYSTEM=pysupport
VERSION=$(shell python -c "import sys; sys.path.append('ows'); import ows_globals; print ows_globals.version")

# CDBS Classes & Rules
# include /usr/share/cdbs/1/rules/debhelper.mk
# include /usr/share/cdbs/1/class/python-distutils.mk
# include /usr/share/cdbs/1/rules/simple-patchsys.mk
# include /usr/share/cdbs/1/class/gnome.mk

# Python stuff
# binary-install/ows_applet.py::
# 	dh_pysupport -pows_applet.py

%:
	dh $@

override_dh_auto_install:
	dh_auto_install
	@find debian/ows/usr/lib/*/dist-packages/ -name "ows_applet.py" -delete

build-orig:
	mkdir -p ows-$(VERSION)
	tar --exclude=debian --exclude=\*~ --exclude=.svn --exclude=\*.pyc \
		--exclude=ows-$(VERSION) -cf - . \
		| ( cd ows-$(VERSION) && tar xf - )
	tar -czf ../tarballs/ows_$(VERSION).orig.tar.gz ows-$(VERSION)
	$(RM) -r ows-$(VERSION)
