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 configure: $(STAMP_DIR)/configure
48 $(STAMP_DIR)/configure: $(STAMP_DIR)/source.make
49 CC=cc ac_cv_path_ISPELL=ispell \
50 SENDMAIL=/usr/sbin/sendmail PERL=/usr/bin/perl \
51 $(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
52 ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \
53 --with-sharedir=/usr/share/mutt --with-docdir=/usr/share/doc \
54 --with-mailpath=/var/mail \
55 --enable-fcntl --enable-pop --enable-imap \
56 --with-mixmaster --with-sasl2 --with-idn \
62 --enable-hcache $(HCACHE_WITH_DB) \
66 build: $(STAMP_DIR)/build
67 $(STAMP_DIR)/build: $(STAMP_DIR)/configure $(STAMP_DIR)/source.make
69 $(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
70 make keymap_defs.h all CFLAGS=\"-O2 -g\" \
74 binary-arch: $(STAMP_DIR)/build checkroot
77 $(MAKE) -f debian/sys-build.mk source.command SOURCE_CMD=" \
78 $(MAKE) install DESTDIR=$D SUBDIRS=\"intl po\" \
81 dh_installdirs -p mutt usr/share/pixmaps usr/lib/mutt/ \
82 usr/bin/ usr/share/doc/mutt/html/
84 dh_installdocs $B/README $B/README.SECURITY $B/README.SSL $B/NEWS \
85 $B/doc/manual.txt $B/doc/PGP-Notes.txt extra/README.SMIME
86 cp $B/doc/*.html $D/usr/share/doc/mutt/html/
87 for file in README BUGS TODO; do \
88 cp $B/imap/$$file $D/usr/share/doc/mutt/$$file.IMAP; \
90 # generate README.Patches
91 for file in $(EXTRA_PATCHES)/*; do \
92 mawk -f debian/gen-README.Patches $$file >> \
93 $D/usr/share/doc/mutt/README.Patches; \
96 $B/contrib/*rc $B/contrib/sample.muttrc-tlr \
97 extra/ray.muttrc extra/colors.angdraug
99 $B/doc/mutt.man $B/doc/dotlock.man \
100 $B/doc/muttrc.man $B/doc/mbox.man
102 install --mode=755 extra/debian-ldap-query extra/mailspell \
103 extra/source-muttrc.d $D/usr/lib/mutt/
104 cp extra/mutt.xpm $D/usr/share/pixmaps/
106 # some fixes to the package structure
107 mv $D/usr/bin/pgp* $D/usr/lib/mutt/
108 mv $D/usr/share/man/man1/dotlock.1 $D/usr/share/man/man1/mutt_dotlock.1
109 rm $D/etc/mime.types $D/usr/bin/muttbug $D/usr/bin/flea
111 # I think the default config file with the embedded manual is too big
112 mv $D/etc/Muttrc $D/usr/share/doc/mutt/examples/
113 cp $B/Muttrc.head $D/etc/Muttrc
114 echo "# GnuPG configuration" >> $D/etc/Muttrc
115 grep ^set $B/contrib/gpg.rc \
116 | sed -e 's#pgpewrap#/usr/lib/mutt/pgpewrap#' \
117 | sed -e 's#/usr/bin/gpg#gpg#' \
119 cat extra/smime-paths.rc extra/source-Muttrc.d.rc >> $D/etc/Muttrc
121 dh_installchangelogs $B/ChangeLog
124 dh_fixperms --exclude=usr/bin/mutt_dotlock
133 find -type f \( -name "*.orig" -o -name "*.rej" \) -exec rm -v {} \;
136 test root = "`whoami`"
138 .PHONY: binary binary-arch build clean configure checkroot extra-clean