#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe

include /usr/share/dpkg/architecture.mk

OPM_DEBIAN_CMAKE_FLAGS =

override_dh_install:
	# Manual delete runpath set by openmpi 5.0.5
	# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1085509
	find debian/tmp/ -name \*.so -o  -name \*.so.\* -exec chrpath -d '{}' \; || true
	find debian/tmp/usr/bin -type f -exec chrpath -d '{}' \; || true
	dh_install

%:
	dh $@

OPM_DEBIAN_MK ?= /usr/share/opm/opm-debian.mk
ifneq ("$(wildcard $(OPM_DEBIAN_MK))","")
   include $(OPM_DEBIAN_MK)
endif
OPM_LIB_DEBIAN_MK ?= /usr/share/opm/opm-lib-debian.mk
ifneq ("$(wildcard $(OPM_LIB_DEBIAN_MK))","")
    include $(OPM_LIB_DEBIAN_MK) # for makeshlibs
endif

