#!/usr/bin/make -f include /usr/share/dpkg/buildflags.mk export DEB_BUILD_MAINT_OPTIONS = hardening=+all export NEOMUTT_TEST_DIR = $(shell pwd)/test-files # To correctly build doc/ with autosetup. # See https://github.com/neomutt/neomutt/issues/980. EXTRA_CFLAGS_FOR_BUILD:=$(shell dpkg-buildflags --get CFLAGS) EXTRA_LDFLAGS_FOR_BUILD:=$(shell dpkg-buildflags --get LDFLAGS) no_notmuch_architectures := alpha hppa hurd-amd64 hurd-i386 powerpc sparc64 ifneq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH), $(no_notmuch_architectures))) notmuch = --notmuch else notmuch = --disable-notmuch endif %: dh $@ --builddirectory override_dh_auto_configure: dh_auto_configure -- \ --mandir=/usr/share/man \ --autocrypt \ --disable-paths-in-cflags \ --full-doc \ --gnutls \ --gpgme \ --gsasl \ --gss \ --lmdb \ --lua \ --lz4 \ $(notmuch) \ --pcre2 \ --sqlite \ --tokyocabinet \ --zlib \ --zstd execute_before_dh_auto_test: cd test-files && ./setup.sh execute_after_dh_auto_test: cd test-files && ./restore.sh override_dh_auto_install: dh_auto_install --destdir=debian/tmp execute_before_dh_install: ( sed -e '/## More settings/,$$d' debian/tmp/etc/neomuttrc || exit 1 ; \ cat debian/extra/rc/neomuttrc.foot ) > debian/tmp/neomuttrc # Install html documentation in the html folder mkdir -p debian/tmp/usr/share/doc/neomutt/html find debian/tmp/usr/share -name *html -exec \ mv {} debian/tmp/usr/share/doc/neomutt/html/ \; set -e; for size in 32 64 128 256; do \ mkdir -p debian/tmp/usr/share/icons/hicolor/$${size}x$${size}/apps; \ mv debian/tmp/usr/share/neomutt/logo/neomutt-$${size}.png debian/tmp/usr/share/icons/hicolor/$${size}x$${size}/apps/neomutt.png; \ done