2015-06-13 01:03:31 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=http://www.mutt.org/
|
2016-04-14 15:40:25 +02:00
|
|
|
TERMUX_PKG_DESCRIPTION="Mail client with patches from neomutt"
|
2016-05-04 14:54:30 +02:00
|
|
|
_MUTT_VERSION=1.6.1
|
|
|
|
_NEOMUTT_PATCHES=20160502
|
2016-04-25 09:54:02 +02:00
|
|
|
TERMUX_PKG_VERSION=${_MUTT_VERSION}.$_NEOMUTT_PATCHES
|
|
|
|
TERMUX_PKG_SRCURL=ftp://ftp.mutt.org/pub/mutt/mutt-${_MUTT_VERSION}.tar.gz
|
|
|
|
TERMUX_PKG_DEPENDS="libandroid-support, ncurses, gdbm, openssl, libsasl"
|
2015-12-15 14:57:25 +01:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-smtp --enable-imap --enable-pop --with-mailpath=$TERMUX_PREFIX/var/mail --with-ssl --enable-compressed --without-idn --enable-hcache --with-sasl"
|
2015-12-14 03:22:39 +01:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-exec-shell=$TERMUX_PREFIX/bin/sh"
|
|
|
|
# The mutt autoconf guesses no for working (v)snprintf and uses broken local versions - avoid that:
|
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" mutt_cv_c99_snprintf=yes mutt_cv_c99_vsnprintf=yes"
|
2016-04-25 09:54:02 +02:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --disable-gpgme"
|
2015-12-14 03:22:39 +01:00
|
|
|
# TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --with-sasl"
|
|
|
|
# bin/{flea,muttbug}: File bug against mutt:
|
2016-04-14 15:40:25 +02:00
|
|
|
TERMUX_PKG_RM_AFTER_INSTALL="bin/flea bin/muttbug share/man/man1/muttbug.1 share/man/man1/flea.1"
|
|
|
|
|
|
|
|
termux_step_post_extract_package () {
|
2016-04-25 09:54:02 +02:00
|
|
|
local PATCHES_TARNAME=neomutt-patches-${_NEOMUTT_PATCHES}.tar.gz
|
|
|
|
local PATCHES_TARPATH=$TERMUX_PKG_CACHEDIR/neomutt-patches-${_NEOMUTT_PATCHES}.tar.gz
|
2016-04-14 15:40:25 +02:00
|
|
|
if [ ! -f $PATCHES_TARPATH ]; then
|
2016-04-25 09:54:02 +02:00
|
|
|
curl --retry 3 -L -o $PATCHES_TARPATH https://github.com/neomutt/neomutt/releases/download/neomutt-${_NEOMUTT_PATCHES}/$PATCHES_TARNAME
|
2016-04-14 15:40:25 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
local PATCHES_DIR=$TERMUX_PKG_TMPDIR/neomutt-patches
|
|
|
|
mkdir -p $PATCHES_DIR
|
|
|
|
$TERMUX_TAR -xf $PATCHES_TARPATH --directory $PATCHES_DIR
|
|
|
|
|
|
|
|
cd $TERMUX_PKG_SRCDIR
|
2016-04-25 09:54:02 +02:00
|
|
|
patch --forward -p1 < $PATCHES_DIR/neomutt-${_NEOMUTT_PATCHES}/neomutt-${_NEOMUTT_PATCHES}.patch || true
|
2016-04-14 15:40:25 +02:00
|
|
|
}
|
2015-12-14 03:22:39 +01:00
|
|
|
|
|
|
|
termux_step_post_configure () {
|
2016-04-14 15:40:25 +02:00
|
|
|
# Build wants to run mutt_md5 and makedoc:
|
|
|
|
gcc -DHAVE_STDINT_H -DMD5UTIL $TERMUX_PKG_SRCDIR/md5.c -o $TERMUX_PKG_BUILDDIR/mutt_md5
|
|
|
|
gcc -DHAVE_STRERROR $TERMUX_PKG_SRCDIR/doc/makedoc.c -o $TERMUX_PKG_BUILDDIR/doc/makedoc
|
|
|
|
$TERMUX_TOUCH -d "next hour" $TERMUX_PKG_BUILDDIR/mutt_md5 $TERMUX_PKG_BUILDDIR/doc/makedoc
|
2015-12-14 03:22:39 +01:00
|
|
|
}
|
2015-06-13 01:03:31 +02:00
|
|
|
|
|
|
|
termux_step_post_make_install () {
|
|
|
|
cp $TERMUX_PKG_SRCDIR/doc/mutt.man $TERMUX_PREFIX/share/man/man1/mutt.1.man
|
2016-04-25 10:46:48 +02:00
|
|
|
mkdir -p $TERMUX_PREFIX/share/examples/mutt/
|
|
|
|
cp $TERMUX_PKG_BUILDER_DIR/gpg.rc $TERMUX_PREFIX/share/examples/mutt/gpg.rc
|
2015-06-13 01:03:31 +02:00
|
|
|
}
|