#!/usr/bin/make -f

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

%:
	dh  $@

override_dh_auto_configure:
	autoreconf -fiv
	ln -sf  /usr/share/misc/config.sub 
	dh_auto_configure -- --disable-color --enable-verbose-test   \
		UUIDLDFLAGS="-lossp-uuid" UUIDFLAGS="-I/usr/include/ossp" SZLIBFLAGS=nosz

override_dh_auto_clean:
	rm -rf config.sub config.log config.status libcmor.a libcmor.so.2 build test_grid

override_dh_auto_build:
	$(MAKE) FC=gfortran

override_dh_auto_install:
	$(MAKE) install DESTDIR=`pwd`/debian/tmp
	$(MAKE) install_shlib DESTDIR=`pwd`/debian/tmp
	for p in `pyversions --supported` ; do \
		$$p ./setup.py install --prefix=`pwd`/debian/python-cmor/usr ; \
		done
