#!/usr/bin/make -f

DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)

ifeq ($(DEB_HOST_ARCH),arm64)
  conf_flags = CC=gcc-4.7 CXX=g++-4.7
endif

override_dh_strip:
	dh_strip --dbg-package=coinor-libsymphony3-dbg

override_dh_auto_build:
	dh_auto_build --
	cd Doc && ( latex man ; latex man ; dvipdfm man )

override_dh_auto_configure:
	dh_auto_configure -- --enable-static $(conf_flags)

override_dh_auto_install:
	dh_auto_install --
	$(RM) debian/tmp/usr/share/coin/doc/SYMPHONY/LICENSE
	chrpath -d debian/tmp/usr/bin/symphony

override_dh_clean:
	dh_clean --exclude=Makefile.orig

%:
	dh $@ --with autotools_dev
