#!/usr/bin/make -f

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

%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean
	rm -rf doxygen

override_dh_auto_configure:
	# building examples and tests can spot building problems for programs using this library
	dh_auto_configure -- -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON

override_dh_auto_build-indep:
	doxygen Doxyfile
	dh_auto_build

override_dh_install-indep:
	# do not install examples for now, unless somebody asks for them, probably upstream should install them
	# in a proper location, and include/echo_server seems not the best one
	rm -rf debian/tmp/usr/include/echo_server/
	dh_install -plibwebsocketpp-doc doxygen/html/*   usr/share/doc/libwebsocketpp-doc/html
	dh_install -plibwebsocketpp-dev debian/tmp/usr/* usr

override_dh_auto_test:
	dh_auto_test
	BOOST_LIBS=/usr/lib/$(DEB_HOST_MULTIARCH) BOOST_INCLUDES=/usr/include/boost scons test
