#!/usr/bin/make -f

export DH_VERBOSE=1

export DEB_CXXFLAGS_MAINT_APPEND = -std=c++11

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

override_dh_auto_configure:
	dh_auto_configure -- \
		--prefix=/usr \
		--with-hepmc-incpath=/usr/include \
	       	--with-hepmc-libpath=/usr/lib/$(DEB_HOST_MULTIARCH) \
		--with-fastjet-incpath=/usr/include \
		--with-fastjet-libpath=/usr/lib/$(DEB_HOST_MULTIARCH) \
		--with-yaml_cpp-incpath=/usr/include \
		--with-yaml_cpp-libpath=/usr/lib/$(DEB_HOST_MULTIARCH) \
		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_auto_install:
	dh_auto_install --max-parallel=1
	chrpath -d debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libRivet.so

override_dh_auto_build-indep:
	dh_auto_build
	$(MAKE) -C doc
	$(MAKE) dox

%:
	dh $@ --with autoreconf,python2 --parallel
