5 include debian/scripts/vars
7 BUILD_DIR := $(SOURCE_DIR)/$(TAR_DIR)
9 D := $(CURDIR)/debian/mutt
11 # Comment this line if you want the header cache with qdbm or gdbm
12 HCACHE_WITH_DB := --without-qdbm --without-gdbm
15 $(MAKE) -f debian/sys-build.mk source.clean
18 # target used by the maintainer
20 $(MAKE) -f debian/sys-build.mk source.build
21 rm -f $B/Muttrc $B/doc/muttrc.man \
22 $B/doc/manual.sgml $B/doc/manual.txt $B/doc/*.html
25 $(MAKE) -f debian/sys-build.mk make-diff
27 unpack: $(STAMP_DIR)/source.make
28 $(STAMP_DIR)/source.make:
29 $(MAKE) -f debian/sys-build.mk source.make
31 # sort the patches list
32 sort $B/PATCHES > $B/PATCHES.temp
33 mv $B/PATCHES.temp $B/PATCHES
36 rm -f $B/Muttrc $B/doc/muttrc.man \
37 $B/doc/manual.sgml $B/doc/manual.txt $B/doc/*.html
39 # we include some #defines in debian-config.h
40 echo '#include "debian-config.h"' >> $B/config.h.in
42 # do not rebuild these files
43 touch $B/configure.in $B/aclocal.m4 $B/Makefile.in $B/configure \
44 $B/stamp-h.in $B/config.h.in
47 # update config.guess and config.sub
48 -test -r /usr/share/misc/config.sub && \
49 cp -f /usr/share/misc/config.sub $B/config.sub
50 -test -r /usr/share/misc/config.guess && \
51 cp -f /usr/share/misc/config.guess $B/config.guess
53 configure: $(STAMP_DIR)/configure
54 $(STAMP_DIR)/configure: $(STAMP_DIR)/source.make
55 CPPFLAGS=-I/usr/include/qdbm \
56 CC=cc ac_cv_path_ISPELL=ispell \
57 SENDMAIL=/usr/sbin/sendmail PERL=/usr/bin/perl \
58 $(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
59 ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \
60 --with-sharedir=/usr/share/mutt --with-docdir=/usr/share/doc \
61 --with-mailpath=/var/mail \
62 --enable-fcntl --enable-pop --enable-imap \
63 --with-mixmaster --with-sasl --with-idn \
69 --enable-hcache $(HCACHE_WITH_DB) \
73 build: $(STAMP_DIR)/build
74 $(STAMP_DIR)/build: $(STAMP_DIR)/configure $(STAMP_DIR)/source.make
76 $(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
77 make keymap_defs.h all CFLAGS=\"-O2 -g\" \
81 binary-arch: $(STAMP_DIR)/build checkroot
84 $(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
85 $(MAKE) install DESTDIR=$D SUBDIRS=\"intl po\" \
88 dh_installdirs -p mutt usr/share/pixmaps usr/lib/mutt/ \
89 usr/bin/ usr/share/doc/mutt/html/
91 dh_installdocs $B/README $B/README.SECURITY $B/README.SSL $B/NEWS \
92 $B/doc/manual.txt $B/doc/PGP-Notes.txt extra/README.SMIME
93 cp $B/doc/*.html $D/usr/share/doc/mutt/html/
94 for file in README BUGS TODO; do \
95 cp $B/imap/$$file $D/usr/share/doc/mutt/$$file.IMAP; \
97 # generate README.Patches
98 for file in $(EXTRA_PATCHES)/*; do \
99 mawk -f debian/gen-README.Patches $$file >> \
100 $D/usr/share/doc/mutt/README.Patches; \
103 $B/contrib/*rc $B/contrib/sample.muttrc-tlr \
104 extra/ray.muttrc extra/colors.angdraug
106 $B/doc/mutt.1 $B/doc/dotlock.man \
107 $B/doc/muttrc.man $B/doc/mbox.man
109 install --mode=755 extra/debian-ldap-query extra/mailspell \
110 extra/source-muttrc.d $D/usr/lib/mutt/
111 cp extra/mutt.xpm $D/usr/share/pixmaps/
113 # some fixes to the package structure
114 mv $D/usr/bin/pgp* $D/usr/lib/mutt/
115 mv $D/usr/share/man/man1/dotlock.1 $D/usr/share/man/man1/mutt_dotlock.1
116 rm $D/etc/mime.types $D/usr/bin/muttbug $D/usr/bin/flea
118 # I think the default config file with the embedded manual is too big
119 mv $D/etc/Muttrc $D/usr/share/doc/mutt/examples/
120 cp $B/Muttrc.head $D/etc/Muttrc
121 echo "# GnuPG configuration" >> $D/etc/Muttrc
122 grep ^set $B/contrib/gpg.rc \
123 | sed -e 's#pgpewrap#/usr/lib/mutt/pgpewrap#' \
124 | sed -e 's#/usr/bin/gpg#gpg#' \
126 cat extra/smime-paths.rc extra/source-Muttrc.d.rc >> $D/etc/Muttrc
128 dh_installchangelogs $B/ChangeLog
131 dh_fixperms --exclude=usr/bin/mutt_dotlock
140 find -type f \( -name "*.orig" -o -name "*.rej" \) -exec rm -v {} \;
143 test root = "`whoami`"
145 .PHONY: binary binary-arch build clean configure checkroot extra-clean