mutt: Add example file for gpg setup
authorFredrik Fornwall <fredrik@fornwall.net>
Mon, 25 Apr 2016 08:46:48 +0000 (04:46 -0400)
committerFredrik Fornwall <fredrik@fornwall.net>
Mon, 25 Apr 2016 08:46:48 +0000 (04:46 -0400)
Setting up gpg should now be possible with this line in .muttrc:

source $PREFIX/share/examples/mutt/gpg.rc

packages/mutt/build.sh
packages/mutt/gpg.rc [new file with mode: 0644]

index bb9fd22..0fb90fe 100644 (file)
@@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Mail client with patches from neomutt"
 _MUTT_VERSION=1.6.0
 _NEOMUTT_PATCHES=20160416
 TERMUX_PKG_VERSION=${_MUTT_VERSION}.$_NEOMUTT_PATCHES
+TERMUX_PKG_BUILD_REVISION=1
 TERMUX_PKG_SRCURL=ftp://ftp.mutt.org/pub/mutt/mutt-${_MUTT_VERSION}.tar.gz
 TERMUX_PKG_DEPENDS="libandroid-support, ncurses, gdbm, openssl, libsasl"
 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"
@@ -38,4 +39,6 @@ termux_step_post_configure () {
 
 termux_step_post_make_install () {
         cp $TERMUX_PKG_SRCDIR/doc/mutt.man $TERMUX_PREFIX/share/man/man1/mutt.1.man
+       mkdir -p $TERMUX_PREFIX/share/examples/mutt/
+       cp $TERMUX_PKG_BUILDER_DIR/gpg.rc $TERMUX_PREFIX/share/examples/mutt/gpg.rc
 }
diff --git a/packages/mutt/gpg.rc b/packages/mutt/gpg.rc
new file mode 100644 (file)
index 0000000..ad7fbe5
--- /dev/null
@@ -0,0 +1,12 @@
+set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f"
+set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f"
+set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %f"
+set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
+set pgp_clearsign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
+set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to $pgp_sign_as -- -r %r -- %f"
+set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to $pgp_sign_as -- -r %r -- %f"
+set pgp_import_command="gpg --no-verbose --import -v %f"
+set pgp_export_command="gpg --no-verbose --export --armor %r"
+set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r"
+set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r"
+set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r"