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 gdbm
12 HCACHE_WITH_DB := --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 CC=cc ac_cv_path_ISPELL=ispell \
56 SENDMAIL=/usr/sbin/sendmail PERL=/usr/bin/perl \
57 $(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
58 ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \
59 --with-sharedir=/usr/share/mutt --with-docdir=/usr/share/doc \
60 --with-mailpath=/var/mail \
61 --enable-fcntl --enable-pop --enable-imap \
62 --with-mixmaster --with-sasl2 --with-idn \
68 --enable-hcache $(HCACHE_WITH_DB) \
72 build: $(STAMP_DIR)/build
73 $(STAMP_DIR)/build: $(STAMP_DIR)/configure $(STAMP_DIR)/source.make
75 $(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
76 make keymap_defs.h all CFLAGS=\"-O2 -g\" \
80 binary-arch: $(STAMP_DIR)/build checkroot
83 $(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
84 $(MAKE) install DESTDIR=$D SUBDIRS=\"intl po\" \
87 dh_installdirs -p mutt usr/share/pixmaps usr/lib/mutt/ \
88 usr/bin/ usr/share/doc/mutt/html/
90 dh_installdocs $B/README $B/README.SECURITY $B/README.SSL $B/NEWS \
91 $B/doc/manual.txt $B/doc/PGP-Notes.txt extra/README.SMIME
92 cp $B/doc/*.html $D/usr/share/doc/mutt/html/
93 for file in README BUGS TODO; do \
94 cp $B/imap/$$file $D/usr/share/doc/mutt/$$file.IMAP; \
96 # generate README.Patches
97 for file in $(EXTRA_PATCHES)/*; do \
98 mawk -f debian/gen-README.Patches $$file >> \
99 $D/usr/share/doc/mutt/README.Patches; \
102 $B/contrib/*rc $B/contrib/sample.muttrc-tlr \
103 extra/ray.muttrc extra/colors.angdraug
105 $B/doc/mutt.1 $B/doc/dotlock.man \
106 $B/doc/muttrc.man $B/doc/mbox.man
108 install --mode=755 extra/debian-ldap-query extra/mailspell \
109 extra/source-muttrc.d $D/usr/lib/mutt/
110 cp extra/mutt.xpm $D/usr/share/pixmaps/
112 # some fixes to the package structure
113 mv $D/usr/bin/pgp* $D/usr/lib/mutt/
114 mv $D/usr/share/man/man1/dotlock.1 $D/usr/share/man/man1/mutt_dotlock.1
115 rm $D/etc/mime.types $D/usr/bin/muttbug $D/usr/bin/flea
117 # I think the default config file with the embedded manual is too big
118 mv $D/etc/Muttrc $D/usr/share/doc/mutt/examples/
119 cp $B/Muttrc.head $D/etc/Muttrc
120 echo "# GnuPG configuration" >> $D/etc/Muttrc
121 grep ^set $B/contrib/gpg.rc \
122 | sed -e 's#pgpewrap#/usr/lib/mutt/pgpewrap#' \
123 | sed -e 's#/usr/bin/gpg#gpg#' \
125 cat extra/smime-paths.rc extra/source-Muttrc.d.rc >> $D/etc/Muttrc
127 dh_installchangelogs $B/ChangeLog
130 dh_fixperms --exclude=usr/bin/mutt_dotlock
139 find -type f \( -name "*.orig" -o -name "*.rej" \) -exec rm -v {} \;
142 test root = "`whoami`"
144 .PHONY: binary binary-arch build clean configure checkroot extra-clean