#!/usr/bin/make -f
# -*- makefile -*-
#  debian rules file for student-control-panel

#export DH_VERBOSE=1

PYVERSIONS= $(shell pyversions -r debian/control)
export PYVERSIONS

build: build-stamp

build-stamp: 
	dh_testdir
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	for v in $(PYVERSIONS); do \
	  mkdir -p debian/python-tcm/usr/lib/$$v/site-packages/student-control-panel; \
	  mkdir -p debian/thin-client-manager-gnome/usr/lib/$$v/site-packages/student-control-panel; \
	  export MODULESDIRTCM=$(CURDIR)/debian/thin-client-manager-gnome/usr/lib/$$v/site-packages/ ; \
	  export MODULESDIR=$(CURDIR)/debian/python-tcm/usr/lib/$$v/site-packages/ ; make install; \
	done

	dh_installchangelogs 
	dh_installdocs
	dh_installexamples
	dh_installman student-control-panel.1
	dh_install 
	dh_compress
	dh_fixperms
	dh_pycentral -i
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb


# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

binary-arch:

binary: binary-indep
.PHONY: build clean binary-indep binary install
