#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules file for sitplus
# Author: Luis Rivas Vañó <luinix@gmail.com>
# License: GPL-3.0+

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

CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) -fpermissive

override_dh_auto_configure:
	CXXFLAGS="$(CXXFLAGS)" dh_auto_configure -- \
	    -DCMAKE_BUILD_TYPE=Release \
	    -DCMAKE_INSTALL_RPATH=/usr/lib/sitplus \
	    -DCMAKE_EXE_LINKER_FLAGS="-lboost_system -lopencv_core -lopencv_highgui" \
	    -DOpenCV_DIR=/usr/share/OpenCV/

override_dh_auto_install:
	dh_auto_install
	rm -f ${CURDIR}/debian/tmp/usr/share/sitplus/graphics/pictures/License.txt

override_dh_makeshlibs:
	dh_makeshlibs -n

override_dh_installchangelogs:
	dh_installchangelogs ${CURDIR}/NEWS

%:
	dh $@
