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 #ln -sf /usr/share/misc/config.sub .
79 #ln -sf /usr/share/misc/config.guess .
81 # do not rebuild these files
82 touch configure.ac aclocal.m4 Makefile.in configure config.h.in
86 env CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
87 ../configure $(confflags)
89 echo '#include "config-debian.h"' >>$(objdir)/config.h
93 build build-arch: $(objdir)/build-stamp
94 $(objdir)/build-stamp: $(objdir)/configure-stamp
95 cd $(objdir) && $(MAKE) CFLAGS="$(CFLAGS)"
98 install: debian/tmp/install-stamp
99 debian/tmp/install-stamp: $(objdir)/build-stamp
103 cd $(objdir) && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
105 cd debian/tmp/usr/share/doc && \
106 rm -rf samples/iconv samples/ca-bundle.crt && \
107 mv NEWS NEWS.old && \
108 mv ChangeLog.old changelog.old && \
109 cp $(CURDIR)/UPDATING NEWS
111 chmod +x debian/extra/lib/*
112 chmod +x debian/header.awk
113 debian/header.awk debian/patches/features/* >debian/tmp/README.Patches
115 ( sed -e '/## More settings/,$$d' $(objdir)/Muttrc || exit 1 ; \
116 cat debian/extra/rc/Muttrc.foot ) > debian/tmp/Muttrc
118 ( echo "# GnuPG configuration"; \
119 grep '^set' contrib/gpg.rc; \
120 echo ) > debian/tmp/gpg.rc
124 binary binary-arch: build install
134 dh_installchangelogs ChangeLog
138 dh_compress --exclude usr/share/doc/mutt/README.Patches
139 dh_fixperms --exclude usr/bin/mutt_dotlock
147 @echo "Nothing to do."
155 #rm -f config.guess config.sub
163 .PHONY: configure build build-arch build-indep clean install binary binary-arch binary-indep patch