bin/setup-neomutt

Wed, 14 Feb 2018 12:25:53 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Wed, 14 Feb 2018 12:25:53 -0500
changeset 678
4c569c2420f1
parent 664
66ba2d649859
child 709
1ee07b0bb607
permissions
-rwxr-xr-x

oh, add the cache path too

#!/bin/sh
set -eu

case ${1:-} in *help|-h)
  exec perldoc -T $0;;
esac

cd
mkdir -p sandbox

if [ ! -d sandbox/neomutt ]; then
  git clone --depth 1 https://github.com/neomutt/neomutt.git sandbox/neomutt
else
  make -C sandbox/neomutt clean >/dev/null 2>&1 || true
  git -C sandbox/neomutt pull
fi

cd sandbox/neomutt

case "$(uname -s)" in
  Darwin)
    CONFIGURE_OPTIONS='--with-ssl=/opt/local --with-gpgme=/opt/local'
    ;;
  *)
    CONFIGURE_OPTIONS=''
    ;;
esac

autoreconf -i --force || true

./configure \
 --with-mailpath=/var/spool/mail \
 --ssl \
 --sasl \
 --lmdb \
 --gpgme \
 $CONFIGURE_OPTIONS \
 --disable-doc

make -s -j3

cd ~/bin
for BIN in neomutt mutt_dotlock pgpewrap; do
  ln -sf ../sandbox/neomutt/$BIN
done
ln -sf ../sandbox/neomutt/neomutt mutt

:<<=cut
=head1 NAME

setup-neomutt - Clone/update and build neomutt

=head1 DESCRIPTION

Run to do the above, incl. symlinking relevant binaries in C<~/bin> to the
neomutt build.

=head1 REQUIREMENTS

=head2 Debian

  apt install autoconf links pandoc gnupg2 gpgsm urlscan libncursesw5-dev \
    libssl-dev libsasl2-dev liblmdb-dev libgpgme11-dev

=head2 Cygwin / Babun

 pact install autoconf links libncursesw-devel openssl-devel libsasl2-devel \
   liblmdb-devel libgpgme-devel

gpg2 isn't available in cygwin, but there is a windows build.  using it with
cygwin paths requires a wrapper though.

=cut

mercurial