#!/usr/bin/make -f

include /usr/share/dpkg/default.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

%:
	dh $@ --with python3

override_dh_auto_configure:
	PYTHON=/usr/bin/python3 dh_auto_configure -- $(confflags) \
		--prefix=/usr \
		--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
		--with-openssl \
		--with-omniNames-logdir=/var/lib/omniorb

override_dh_auto_install:
	dh_auto_install
	dh_python3 -pomniidl

override_dh_fixperms-indep:
	dh_fixperms
	find debian/omniorb-doc/usr/share/doc/omniorb/examples -type f -exec chmod 644 "{}" \;
