#!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=+all include /usr/share/dpkg/architecture.mk include /usr/share/dpkg/pkg-info.mk # If noopt was not passed, building with NDEBUG to remove assertions. ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) export DEB_CXXFLAGS_MAINT_APPEND=-DNDEBUG endif %: dh $@ --without autoreconf override_dh_auto_build: dh_auto_build make doxydoc $(RM) doxydoc/html/*.md5 doxydoc/html/*.dot doxydoc/html/*.map $(RM) doxydoc/html/installdox $(RM) doxydoc/html/formula.repository override_dh_auto_configure: ./configure --prefix=/usr --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \ --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \ --enable-static --enable-cbc-parallel --enable-dot --enable-dependency-linking override_dh_strip: dh_strip find . -name '*.a' \( \! -name '*_g.a' \) \ -exec $(STRIP) --strip-debug \ --remove-section=.comment \ --remove-section=.note {} \; override_dh_auto_install: make install DESTDIR=$(CURDIR)/debian/tmp find $(CURDIR)/debian/tmp -name "*.la" -delete # this is AUTHORS, LICENSE and a useless cbc_addlibs.txt rm -rf $(CURDIR)/debian/tmp/usr/share/ override_dh_fixperms-indep: dh_fixperms find debian/coinor-libcbc-doc -name '*.cpp' -exec chmod -x '{}' \; execute_before_dh_installdocs-indep: # Removing the build directory from documentation files to enhance build # reproducibility. for F in $$(find doxydoc/html -name "*.html"); do\ sed -i "s,$(CURDIR)/,," $$F;\ done execute_after_dh_installexamples-indep: # Removing the build directory from Makefile to enhance build # reproducibility. for F in $$(find debian/coinor-libcbc-doc -name "Makefile"); do\ sed -i "s,$(CURDIR),.," $$F;\ done