# Contributor: tobias [tobias [at] archlinux.org]
pkgname=mutt-sidebar
pkgver=1.5.21
pkgrel=5
pkgdesc='Small but very powerful text-based mail client'
url='http://www.mutt.org/'
license=('GPL')
backup=('etc/Muttrc')
arch=('i686' 'x86_64')
conflicts=('mutt')
optdepends=('smtp-forwarder: to send mail')
depends=('gpgme' 'ncurses' 'openssl' 'libsasl' 'gdbm' 'libidn' 'mime-types' 'krb5')
provides=('mutt')
conflicts=('mutt')
source=("ftp://ftp.mutt.org/mutt/devel/mutt-${pkgver}.tar.gz"
"http://patch-tracker.debian.org/patch/series/dl/mutt/1.5.21-6.1/mutt-patched/sidebar"
"http://patch-tracker.debian.org/patch/series/dl/mutt/1.5.21-6.1/mutt-patched/sidebar-dotted"
"http://patch-tracker.debian.org/patch/series/dl/mutt/1.5.21-6.1/mutt-patched/sidebar-sorted"
"http://patch-tracker.debian.org/patch/series/dl/mutt/1.5.21-6.1/mutt-patched/sidebar-utf8"
"http://patch-tracker.debian.org/patch/series/dl/mutt/1.5.21-6.1/mutt-patched/multiple-fcc"
"http://dbg.download.sourcemage.org/grimoire/codex/stable/mail/mutt/patches/trash_folder/trash_folder-1.5.18.patch.bz2"
"build.patch")
install=install
build() {
cd "${srcdir}/mutt-${pkgver}"
patch -p1 -i ../sidebar
patch -p1 -i ../sidebar-dotted
patch -p1 -i ../sidebar-sorted
patch -p1 -i ../sidebar-utf8
patch -p1 -i ../multiple-fcc
patch -p1 -i ../trash_folder-1.5.18.patch
patch -p1 -i ../build.patch
echo "sidebar-1.5.21-6.1 (debian-version)" >> PATCHES
echo "sidebar-dotted-1.5.21-6.1 (debian-version)" >> PATCHES
echo "sidebar-sorted-1.5.21-6.1 (debian-version)" >> PATCHES
echo "sidebar-utf8-1.5.21-6.1 (debian-version)" >> PATCHES
echo "multiple-fcc-1.5.21-6.1 (debian-version)" >> PATCHES
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--enable-gpgme \
--enable-pop \
--enable-imap \
--enable-smtp \
--enable-hcache \
--with-curses=/usr \
--with-regex \
--with-gss=/usr \
--with-ssl=/usr \
--with-sasl \
--with-idn \
make
}
package() {
cd "${srcdir}/mutt-${pkgver}"
make DESTDIR="${pkgdir}" install
rm "${pkgdir}"/usr/bin/{flea,muttbug}
rm "${pkgdir}"/usr/share/man/man1/{flea,muttbug}.1
rm "${pkgdir}"/etc/mime.types{,.dist}
install -Dm644 contrib/gpg.rc "${pkgdir}"/etc/Muttrc.gpg.dist
}
md5sums=('a29db8f1d51e2f10c070bf88e8a553fd'
'24c5626910e9e24357dd00bc99d37f3f'
'53adaf8bd7285afabde2e54707ca8c29'
'704f5720ffdda708ea136a328341f263'
'7ca548cc83854d597f44c140ec3ab66d'
'1aa619582d7e68c9e23a68a0b7992b73'
'9d95c08295f8ec5171f774f776ef8413'
'e902fd103fd0c97347d923f3ca8f1554')