#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all include /usr/share/dpkg/default.mk ifeq (,$(filter nolto,$(DEB_BUILD_OPTIONS))) export DEB_LDFLAGS_MAINT_APPEND+=-flto export DEB_CFLAGS_MAINT_APPEND+=-flto endif sampledir:=$(CURDIR)/debian/$(DEB_SOURCE)-examples/usr/share/doc/$(DEB_SOURCE)/examples %: dh $@ ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU) ifeq (amd64,$(ARCH)) DEB_CONFIGURE_EXTRA_FLAGS := --enable-threads --enable-sse else ifeq (powerpc,$(ARCH)) DEB_CONFIGURE_EXTRA_FLAGS := --enable-threads --enable-vmx else ifeq (ppc64,$(ARCH)) DEB_CONFIGURE_EXTRA_FLAGS := --enable-threads --enable-vmx else ifeq (arm64,$(ARCH)) DEB_CONFIGURE_EXTRA_FLAGS := --enable-threads --enable-neon else DEB_CONFIGURE_EXTRA_FLAGS := --enable-threads endif override_dh_autoreconf: AUTOHEADER=true dh_autoreconf override_dh_auto_configure: CPPFLAGS="$(shell dpkg-buildflags --get CPPFLAGS)" dh_auto_configure -- $(DEB_CONFIGURE_EXTRA_FLAGS) override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) export V=VERBOSE ; make check -j$(shell nproc) | tee debian/test_log if tail -n 6 debian/test_log | head -n 1 | grep -q FAILED ; then false ; fi endif override_dh_auto_build: export V=VERBOSE ; dh_auto_build override_dh_auto_clean: dh_auto_clean rm -f testsuite/esltmp* rm -f easel/testsuite/esltmp* rm -f tutorial/MADE1.hmm.h3? rm -f config.log config.status configure find . -name Makefile -delete override_dh_compress: dh_compress -Xtutorial/ override_dh_auto_install: dh_auto_install mkdir -p $(CURDIR)/debian/$(DEB_SOURCE)/usr/lib/${DEB_HOST_MULTIARCH}/hmmer/ cp src/hmmc2 $(CURDIR)/debian/$(DEB_SOURCE)/usr/lib/${DEB_HOST_MULTIARCH}/hmmer/ override_dh_installexamples: dh_installexamples mkdir -p $(sampledir)/src/impl find src/ -maxdepth 1 -name "*_utest" -exec cp \{\} $(sampledir)/src/ \; find src/impl_sse -name "*_utest" -exec cp \{\} $(sampledir)/src/impl \; cp src/itest_brute $(sampledir)/src cp src/hmmpress.itest.pl $(sampledir)/src cp -aR testsuite $(sampledir) find easel -name "*.o" -delete cp -aR easel $(sampledir) cp -aR tutorial $(sampledir) find $(sampledir) -name 'Makefile' | xargs sed -i "s^$(CURDIR)^.^g" find $(sampledir) -name "esltmp*" -delete override_dh_fixperms: dh_fixperms find debian -name .dropbox.attr -delete find debian -name "*.fa" -executable -exec chmod -x \{\} \; find $(sampledir) -name "*.man" -exec chmod -x \{\} \;