#!/usr/bin/make -f
# -*- makefile -*-

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

# Get version numbers for SONAME from changelog
DVER = $(shell dpkg-parsechangelog | grep '^Version')
LVER = $(shell echo $(DVER) | sed -e 's/Version: \([0-9]*\)\..*/\1/')
LSUBVER = $(shell echo $(DVER) | sed -e 's/Version: .*\.\([0-9]*\).*/\1/')
export LVER
export LSUBVER

# Python versions supported by this package
PYVERS = $(shell pyversions -r -v)
export PYVERS

CFLAGS += -Wall -Wno-unused


%:
	dh $@ 

override_dh_auto_build:
	make lib
	make standalone
	for py in $(PYVERS); do \
		PYVER=$$py make python; \
	done

override_dh_strip:
	dh_strip --dbg-package=libmpikmeans-dbg
	
	# Rename pyshared to pymodules
	cd debian/libmpikmeans-dbg/usr/lib/debug/usr/lib && mv pyshared pymodules

