#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

clean:
	dh_testdir
	dh_testroot
	cp build/config-linux-gcc.py config.py
	scons -c
	rm -f build-stamp configure-stamp
	rm -Rf .sconsign.dblite .sconf_temp/
	rm -f config.py config.log
	dh_clean

configure: 

binary-arch:
	dh_testdir
	dh_testroot
	cp build/config-linux-gcc.py config.py
	scons -j 2
	dh_installdirs
	dh_auto_install
	dh_install
	for pyver in `ls dist/python`; \
	do \
		mkdir -p debian/mitsuba/usr/lib/python$$pyver/dist-packages; \
		cp -a dist/python/$$pyver/mitsuba.so debian/mitsuba/usr/lib/python$$pyver/dist-packages; \
	done
	dh_installmenu
	dh_compress
	dh_fixperms
	dh_strip
	dh_makeshlibs
	dh_shlibdeps
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-indep:

binary: binary-arch binary-indep

build: binary
