#! /usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

packagedoc=python-pmw-doc
source_dir=$(CURDIR)/src/Pmw
package_dir=./debian/python-pmw
pdoc=./debian/python-pmw-doc
v=Pmw_1_3
PYTHON=`readlink /usr/bin/python`

build: 
	dh_testdir
	touch build

clean: 
	dh_testdir
	-rm -f build
	dh_clean -i

binary-indep: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs -Ai
	mkdir -p $(package_dir)/usr/lib/$(PYTHON)/site-packages/Pmw/$(v)
	mkdir -p $(pdoc)/usr/share/doc/$(packagedoc)/examples
	dh_installdocs -Ai $(source_dir)/README
	dh_installchangelogs -i $(source_dir)/$(v)/doc/changes.html
	install -m 644 $(source_dir)/__init__.py			\
		$(package_dir)/usr/lib/$(PYTHON)/site-packages/Pmw/
	install -m 644 $(source_dir)/$(v)/__init__.py			\
		$(package_dir)/usr/lib/$(PYTHON)/site-packages/Pmw/$(v)/
	cp -pr $(source_dir)/$(v)/lib					\
		$(package_dir)/usr/lib/$(PYTHON)/site-packages/Pmw/$(v)/
	install -m 644 $(source_dir)/$(v)/demos/* 				\
		$(pdoc)/usr/share/doc/$(packagedoc)/examples/
	cp -pr $(source_dir)/$(v)/doc					\
		$(pdoc)/usr/share/doc/$(packagedoc)/html
	dh_fixperms -i
	dh_compress -AiX.py
	chmod a+x $(pdoc)/usr/share/doc/$(packagedoc)/examples/All.py
	dh_pycentral -i
	rm -f $(package_dir)/usr/lib
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

binary-arch:
# There are no architecture-dependent files to be uploaded
# generated by this package.  If there were any they would be
# made here.


# Below here is fairly generic really

binary:	binary-indep binary-arch

.PHONY: binary binary-arch binary-indep clean
