bin/setup-neomutt

Wed, 27 Sep 2017 18:46:46 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Wed, 27 Sep 2017 18:46:46 -0400
changeset 649
a421fcbe4dd4
parent 645
2b7084ae3b6c
child 663
0f2e760661e8
permissions
-rwxr-xr-x

bring that new-vim shortcut to i3 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

PLATFORM="$(uname -s)"
HCACHE="tokyocabinet"

case "$PLATFORM" in
  Darwin)
    # Use macports' headers
    OPENSSL_PREFIX=/opt/local
    ;;
  Cygwin)
    HCACHE=lmdb
    ;;
esac

autoreconf -i --force

./configure -q \
 --with-mailpath=/var/spool/mail \
 --with-ssl${OPENSSL_PREFIX:+=$OPENSSL_PREFIX} \
 --with-sasl \
 --with-${HCACHE} \
 --enable-gpgme \
 --disable-doc --disable-po

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 libtokyocabinet-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