#!/usr/bin/make -f 

RENAMED_BINARIES=player playerv playercam playerjoy playernav playerprint playervcr playerwritemap pmaptest

%: 
	dh $@

override_dh_clean:
	dh_clean
	# for some reason, the build makes this file in the main source
	rm -f doc/player.tag

override_dh_install:
	for i in $(RENAMED_BINARIES); do mv -v debian/tmp/usr/bin/$$i debian/tmp/usr/bin/robot-$$i; done
	install -d debian/tmp/usr/share/doc/player
	mv -f debian/tmp/usr/share/doc/player-3.0.2 debian/tmp/usr/share/doc/player/html
	dh_install

override_dh_auto_configure:
	dh_auto_configure -- -DCMAKE_SKIP_RPATH=TRUE -DBUILD_DOCUMENTATION=TRUE

override_dh_auto_build:
	dh_auto_build
	# docs don't get built automatically
	(cd obj-$(DEB_BUILD_GNU_TYPE) && make doc)
