3 include /usr/share/quilt/quilt.make
6 # Uncomment one of these if you're rebuilding using them instead of libdb4.X
13 hcache_db := --without-gdbm --without-qdbm
14 ifeq ($(HCACHE_DB),gdbm)
15 hcache_db := --without-qdbm --without-bdb
17 ifeq ($(HCACHE_DB),qdbm)
18 hcache_db := --without-gdbm --without-bdb
21 confflags = --prefix=/usr \
23 --mandir=/usr/share/man \
24 --with-sharedir=/usr/share/mutt \
25 --with-docdir=/usr/share/doc \
26 --with-mailpath=/var/mail \
28 --disable-dependency-tracking \
48 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
49 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
50 confflags += --build $(DEB_BUILD_GNU_TYPE)
51 # Only specify --host when cross-compiling
52 ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
53 confflags += --host $(DEB_HOST_GNU_TYPE)
58 CPPFLAGS = -I/usr/include/qdbm
59 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
65 # Directory to make the build on
66 objdir = $(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)
68 configure: $(objdir)/configure-stamp
69 $(objdir)/configure-stamp: $(QUILT_STAMPFN)
72 #ln -sf /usr/share/misc/config.sub .
73 #ln -sf /usr/share/misc/config.guess .
75 # do not rebuild these files
76 touch configure.ac aclocal.m4 Makefile.in configure config.h.in
80 env CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
81 ../configure $(confflags)
83 echo '#include "config-debian.h"' >>$(objdir)/config.h
87 build build-arch: $(objdir)/build-stamp
88 $(objdir)/build-stamp: $(objdir)/configure-stamp
89 cd $(objdir) && $(MAKE) CFLAGS="$(CFLAGS)"
92 install: debian/tmp/install-stamp
93 debian/tmp/install-stamp: $(objdir)/build-stamp
97 cd $(objdir) && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
99 cd debian/tmp/usr/share/doc && \
100 rm -rf samples/iconv samples/ca-bundle.crt && \
101 mv NEWS NEWS.old && \
102 mv ChangeLog.old changelog.old && \
103 cp $(CURDIR)/UPDATING NEWS
105 chmod +x debian/extra/lib/*
106 chmod +x debian/header.awk
107 debian/header.awk debian/patches/features/* >debian/tmp/README.Patches
109 ( sed -e '/## More settings/,$$d' $(objdir)/Muttrc || exit 1 ; \
110 cat debian/extra/rc/Muttrc.foot ) > debian/tmp/Muttrc
112 ( echo "# GnuPG configuration"; \
113 grep '^set' contrib/gpg.rc; \
114 echo ) > debian/tmp/gpg.rc
118 binary binary-arch: build install
128 dh_installchangelogs ChangeLog
132 dh_compress --exclude usr/share/doc/mutt/README.Patches
133 dh_fixperms --exclude usr/bin/mutt_dotlock
141 @echo "Nothing to do."
149 #rm -f config.guess config.sub
157 .PHONY: configure build build-arch build-indep clean install binary binary-arch binary-indep patch