#export DH_VERBOSE=1
SOURCEDIR=${CURDIR}/c++
-export DEB_CONFIGURE_EXTRA_FLAGS= --with-dll --without-debug --with-mt --without-gbench --without-internal \
- --libdir=${CURDIR}/debian/ncbi-blast+/usr/lib/ncbi-blast+ --bindir=${CURDIR}/debian/ncbi-blast+/usr/bin \
- --includedir=$(SOURCEDIR)/include --with-3psw=std:netopt --without-dbapi
+DEB_CONFIGURE_EXTRA_FLAGS=--with-dll --with-mt --without-autodep \
+ --without-makefile-auto-update --with-flat-makefile --without-dbapi \
+ --without-lzo --with-runpath=/usr/lib/ncbi-blast+ --with-build-root=BUILD
+
+# XXX - not quite right, as we get -DNDEBUG vs. -D_DEBUG
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+DEB_CONFIGURE_EXTRA_FLAGS += --without-debug
+else
+DEB_CONFIGURE_EXTRA_FLAGS += --with-optimization
+endif
+
override_dh_auto_configure:
- ( cd $(SOURCEDIR) ; ./configure ${DEB_CONFIGURE_EXTRA_FLAGS} --prefix=${SOURCEDIR}/debian/ncbi-blast+ )
+ cd c++ && LD_LIBRARY_PATH=$(CURDIR)/c++/BUILD/lib \
+ ./configure $(DEB_CONFIGURE_EXTRA_FLAGS)
instroot = debian/ncbi-blast+/usr