3 include /usr/share/quilt/quilt.make
12 # GPGME := --enable-gpgme
17 ifeq ($(HCACHE_DB),bdb)
18 hcache_db := --without-gdbm --without-qdbm
20 ifeq ($(HCACHE_DB),gdbm)
21 hcache_db := --without-qdbm --without-bdb
23 ifeq ($(HCACHE_DB),qdbm)
24 hcache_db := --without-gdbm --without-bdb
27 confflags = --prefix=/usr \
29 --mandir=/usr/share/man \
30 --with-sharedir=/usr/share/mutt \
31 --with-docdir=/usr/share/doc \
32 --with-mailpath=/var/mail \
34 --disable-dependency-tracking \
54 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
55 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
56 confflags += --build $(DEB_BUILD_GNU_TYPE)
57 # Only specify --host when cross-compiling
58 ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
59 confflags += --host $(DEB_HOST_GNU_TYPE)
64 CPPFLAGS = -I/usr/include/qdbm
65 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
71 # Directory to make the build on
72 objdir = $(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)
74 configure: $(objdir)/configure-stamp
75 $(objdir)/configure-stamp: $(QUILT_STAMPFN)
78 autoreconf --install --include=m4
81 env CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
82 ../configure $(confflags)
84 echo '#include "config-debian.h"' >>$(objdir)/config.h
88 build build-arch: $(objdir)/build-stamp
89 $(objdir)/build-stamp: $(objdir)/configure-stamp
90 cd $(objdir) && $(MAKE) CFLAGS="$(CFLAGS)"
93 install: debian/tmp/install-stamp
94 debian/tmp/install-stamp: $(objdir)/build-stamp
98 cd $(objdir) && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
100 cd debian/tmp/usr/share/doc && \
101 rm -rf samples/iconv samples/ca-bundle.crt && \
102 mv NEWS NEWS.old && \
103 mv ChangeLog.old changelog.old && \
104 cp $(CURDIR)/UPDATING NEWS
106 chmod +x debian/extra/lib/*
107 chmod +x debian/header.awk
108 debian/header.awk debian/patches/features/* >debian/tmp/README.Patches
110 ( sed -e '/## More settings/,$$d' $(objdir)/doc/Muttrc || exit 1 ; \
111 cat debian/extra/rc/Muttrc.foot ) > debian/tmp/Muttrc
113 ( echo "# GnuPG configuration"; \
114 grep '^set' contrib/gpg.rc; \
115 echo ) > debian/tmp/gpg.rc
119 binary binary-arch: build install
129 dh_installchangelogs ChangeLog
130 install -m644 debian/mutt.lintian $(CURDIR)/debian/mutt/usr/share/lintian/overrides/mutt
132 dh_strip --dbg-package=mutt-dbg
133 rm -rf $(CURDIR)/debian/mutt-dbg/usr/share/doc/mutt-dbg
135 dh_compress --exclude usr/share/doc/mutt/README.Patches
136 dh_fixperms --exclude usr/bin/mutt_dotlock
144 @echo "Nothing to do."
157 # remove autotool-generated files so they don't show up in the diff.gz
158 rm -f configure config.h.in
159 rm -f Makefile.in contrib/Makefile.in imap/Makefile.in doc/Makefile.in m4/Makefile.in
161 # clean PATCHES hunks (blame quilt refresh)
162 for p in `grep -rl PATCHES debian/patches` ; do perl -wi debian/fix-PATCHES.pl $$p ; done
166 .PHONY: configure build build-arch build-indep clean install binary binary-arch binary-indep patch