#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

%:
	dh $@ --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure -- \
   -DBUILD_SHARED_LIBS:BOOL=ON \
   -Denable_blaslib:BOOL=OFF \
   -DCMAKE_INSTALL_INCLUDEDIR:PATH=include/superlu/


DEB_SOURCE_PACKAGE = superlu
DEB_UPSTREAM_VERSION = $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p')
DEB_STRIPPED_UPSTREAM_VERSION = $(shell echo $(DEB_UPSTREAM_VERSION) | sed -n -e 's/+dfsg.*$$//p')

get-orig-source:
	uscan --force-download --verbose --check-dirname-level 0 --download-version $(DEB_STRIPPED_UPSTREAM_VERSION) --upstream-version $(DEB_STRIPPED_UPSTREAM_VERSION) --repack --compression xz

override_dh_strip:
	dh_strip --dbgsym-migration='libsuperlu5-dbg (<< 5.2.1+dfsg1-1~)'