#!/usr/bin/make -f

%:
	dh $@ --parallel

override_dh_auto_build:
	scons CFLAGS="-Wno-extra" USE_EXT_BOOST=true PREFIX=/usr \
	CPPFLAGS='-UBOOST_SYSTEM_NO_DEPRECATED' \
	BOOST_LIBPATH=/usr/include/boost DESTDIR=$(CURDIR)/debian/tmp

override_dh_auto_clean:
	dh_auto_clean
	dh_clean config.log tools/scripts/*.pyc config.opts

override_dh_auto_install:
	scons CFLAGS="-Wno-extra" USE_EXT_BOOST=true PREFIX=/usr \
	BOOST_LIBPATH=/usr/include/boost DESTDIR=$(CURDIR)/debian/tmp \
	CC="$(CC)" CXX="$(CXX)" install
	
	cd $(CURDIR)/debian/tmp/usr/share/bombono/resources/frames && \
	mv 'shadow & white' shadow_and_white
	cd $(CURDIR)/debian/tmp/usr/share/bombono/resources/copy-n-paste/ && \
	rm -f FreeSans.ttf && \
	ln -s /usr/share/fonts/truetype/freefont/FreeSans.ttf FreeSans.ttf
	rm -rf debian/tmp/usr/share/man
