diff options
author | OmeGa | 2015-07-08 02:06:12 -0500 |
---|---|---|
committer | OmeGa | 2015-07-08 02:06:12 -0500 |
commit | ba5fe15f9eaa08e023f80d13c499f88095f9c3ad (patch) | |
tree | 5f100f6cc7692b10c1c8df21f13f4b3a68ae04a8 | |
download | aur-ba5fe15f9eaa08e023f80d13c499f88095f9c3ad.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 60 | ||||
-rw-r--r-- | mutt-attach.patch | 115 | ||||
-rw-r--r-- | mutt-kiss.install | 8 | ||||
-rw-r--r-- | simple-noconfig-proposal.patch | 59 |
5 files changed, 266 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..27d31904516d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = mutt-kiss + pkgdesc = Small but very powerful text-based mail client. Sans POP/IMAP/SMTP/SSL, with PGP/attachment patches. + pkgver = 1.5.23 + pkgrel = 1 + url = http://www.mutt.org/ + install = mutt-kiss.install + arch = i686 + arch = x86_64 + license = GPL + depends = gpgme + depends = libidn + depends = ncurses + provides = mutt + conflicts = mutt + backup = etc/Muttrc + source = https://bitbucket.org/mutt/mutt/downloads/mutt-1.5.23.tar.gz + source = simple-noconfig-proposal.patch + source = mutt-attach.patch + sha1sums = 8ac821d8b1e25504a31bf5fda9c08d93a4acc862 + sha1sums = 1ca3a0ab5c4a965d180bd310ba15cfe42c6a4e12 + sha1sums = 94da52d50508d8951aa78ca4b073023414866be1 + +pkgname = mutt-kiss + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5f5297d2ac4e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,60 @@ +# Maintainer: OmeGa <omega [U+0040] mailoo [.] org> +# Contributor: tobias [tobias [at] archlinux.org] +# Contributor: Tom Vincent <http://www.tlvince.com/contact/> + +pkgname=mutt-kiss +pkgver=1.5.23 +pkgrel=1 +pkgdesc="Small but very powerful text-based mail client. Sans POP/IMAP/SMTP/SSL, with PGP/attachment patches." +arch=('i686' 'x86_64') +url="http://www.mutt.org/" +license=('GPL') +depends=('gpgme' 'libidn' 'ncurses') +provides=('mutt') +conflicts=('mutt') +backup=('etc/Muttrc') +install=$pkgname.install +source=("https://bitbucket.org/mutt/mutt/downloads/mutt-$pkgver.tar.gz" + "simple-noconfig-proposal.patch" + "mutt-attach.patch") +sha1sums=('8ac821d8b1e25504a31bf5fda9c08d93a4acc862' + '1ca3a0ab5c4a965d180bd310ba15cfe42c6a4e12' + '94da52d50508d8951aa78ca4b073023414866be1') + +prepare() { + cd "$srcdir/mutt-$pkgver" + + # Named PGP signature patch: http://dev.mutt.org/trac/ticket/3478 + patch -p1 -i ../simple-noconfig-proposal.patch + + # Forgotten attachment detector + patch -p1 -i ../mutt-attach.patch +} + +build() { + cd "$srcdir/mutt-$pkgver" + + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --enable-gpgme \ + --enable-hcache \ + --with-curses=/usr \ + --with-regex \ + --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" +} + +# vim:set ts=2 sw=2 et: diff --git a/mutt-attach.patch b/mutt-attach.patch new file mode 100644 index 000000000000..c926ca307dc9 --- /dev/null +++ b/mutt-attach.patch @@ -0,0 +1,115 @@ +diff -ur a/globals.h b/globals.h +--- a/globals.h 2010-05-28 17:16:31.000000000 -0400 ++++ b/globals.h 2010-05-28 21:28:58.000000000 -0400 +@@ -34,6 +34,7 @@ + WHERE char *AliasFile; + WHERE char *AliasFmt; + WHERE char *AssumedCharset; ++WHERE char *AttachKeyword; + WHERE char *AttachSep; + WHERE char *Attribution; + WHERE char *AttachCharset; +diff -ur a/init.h b/init.h +--- a/init.h 2010-05-28 17:11:18.000000000 -0400 ++++ b/init.h 2010-05-28 21:29:27.000000000 -0400 +@@ -83,6 +83,14 @@ + + struct option_t MuttVars[] = { + /*++*/ ++ { "abort_noattach", DT_QUAD, R_NONE, OPT_ATTACH, M_ASKYES }, ++ /* ++ ** .pp ++ ** If set to \fIyes\fP, when composing messages containing the word ++ ** specified by $attach_keyword (default is "attach") and no attachments ++ ** are given, composition will be aborted. If set to \fIno\fP, composing ++ ** messages as such will never be aborted. ++ */ + { "abort_nosubject", DT_QUAD, R_NONE, OPT_SUBJECT, M_ASKYES }, + /* + ** .pp +@@ -241,6 +249,13 @@ + ** .pp + ** For an explanation of ``soft-fill'', see the $$index_format documentation. + */ ++ { "attach_keyword", DT_STR, R_NONE, UL &AttachKeyword, UL "attach" }, ++ /* ++ ** .pp ++ ** If $abort_attach is not set to no, then the body of the message ++ ** will be scanned for this keyword, and if found, you will be prompted ++ ** if there are no attachments. This is case insensitive. ++ */ + { "attach_sep", DT_STR, R_NONE, UL &AttachSep, UL "\n" }, + /* + ** .pp +diff -ur a/mutt.h b/mutt.h +--- a/mutt.h 2010-05-28 17:13:48.000000000 -0400 ++++ b/mutt.h 2010-05-28 21:29:44.000000000 -0400 +@@ -286,6 +286,8 @@ + OPT_SUBJECT, + OPT_VERIFYSIG, /* verify PGP signatures */ + ++ OPT_ATTACH, /* forgotten attachment detector */ ++ + /* THIS MUST BE THE LAST VALUE. */ + OPT_MAX + }; +diff -ur a/send.c b/send.c +--- a/send.c 2010-05-28 21:42:58.000000000 -0400 ++++ b/send.c 2010-05-28 21:44:39.000000000 -0400 +@@ -1113,6 +1113,34 @@ + } + + int ++mutt_search_attach_keyword(char* filename) ++{ ++ /* searches for the magic keyword "attach" within a file */ ++ int found = 0; ++ char* inputline = malloc(1024); ++ char* lowerKeyword = malloc(strlen(AttachKeyword)+1); ++ FILE *attf = fopen(filename, "r"); ++ int i; ++ for (i=0; i <= strlen(AttachKeyword); i++) { ++ lowerKeyword[i] = tolower(AttachKeyword[i]); ++ } ++ while (!feof(attf)) { ++ fgets(inputline, 1024, attf); ++ for (i=0; i < strlen(inputline); i++) { ++ inputline[i] = tolower(inputline[i]); ++ } ++ if (strstr(inputline, lowerKeyword)) { ++ found = 1; ++ break; ++ } ++ } ++ free(inputline); ++ free(lowerKeyword); ++ fclose(attf); ++ return found; ++} ++ ++int + ci_send_message (int flags, /* send mode */ + HEADER *msg, /* template to use for new message */ + char *tempfile, /* file specified by -i or -H */ +@@ -1605,6 +1633,21 @@ + goto main_loop; + } + ++ if (mutt_search_attach_keyword(msg->content->filename) && ++ !msg->content->next && ++ query_quadoption(OPT_ATTACH, _("No attachments, cancel sending?")) != M_NO) ++ { ++ /* if the abort is automatic, print an error message */ ++ if (quadoption (OPT_ATTACH) == M_YES) { ++ char errorstr[512]; ++ if (snprintf(errorstr, 512, ++ "Message contains magic keyword \"%s\", but no attachments. Not sending.", AttachKeyword)==-1) ++ errorstr[511] = 0; // terminate if need be. our string shouldnt be this long. ++ mutt_error _(errorstr); ++ } ++ goto main_loop; ++ } ++ + if (msg->content->next) + msg->content = mutt_make_multipart (msg->content); + diff --git a/mutt-kiss.install b/mutt-kiss.install new file mode 100644 index 000000000000..d65675c06f64 --- /dev/null +++ b/mutt-kiss.install @@ -0,0 +1,8 @@ +post_install() { + cat <<EOF + +==> For GPG support, add the following to your muttrc: +==> source /etc/Muttrc.gpg.dist + +EOF +} diff --git a/simple-noconfig-proposal.patch b/simple-noconfig-proposal.patch new file mode 100644 index 000000000000..d6f7bbe73e6d --- /dev/null +++ b/simple-noconfig-proposal.patch @@ -0,0 +1,59 @@ +# HG changeset patch +# User Kevin McCarthy <kevin@8t8.us> +# Date 1383096352 25200 +# Tue Oct 29 18:25:52 2013 -0700 +# Node ID e9a88e52c98a404bd2cb4fe48d341e1e50b054c0 +# Parent 1e935cab6f178deefd5f2b9ce5e10638aa64a0f4 +Add gpg signature name. (closes #3478) + +Some mail clients display "noname" for the gpg signature +attachment. This patch sets the mime name to "signature.asc". + +The patch is based on +http://dev.mutt.org/trac/attachment/ticket/3478/gpg_signature_name.patch +with the changes: + - removes the configuration options + - removes mime description + +diff --git a/crypt-gpgme.c b/crypt-gpgme.c +--- a/crypt-gpgme.c ++++ b/crypt-gpgme.c +@@ -913,16 +913,17 @@ + t->encoding = ENCBASE64; + t->use_disp = 1; + t->disposition = DISPATTACH; + t->d_filename = safe_strdup ("smime.p7s"); + } + else + { + t->subtype = safe_strdup ("pgp-signature"); ++ mutt_set_parameter ("name", "signature.asc", &t->parameter); + t->use_disp = 0; + t->disposition = DISPNONE; + t->encoding = ENC7BIT; + } + t->filename = sigfile; + t->unlink = 1; /* ok to remove this file after sending. */ + + return a; +diff --git a/pgp.c b/pgp.c +--- a/pgp.c ++++ b/pgp.c +@@ -1122,16 +1122,17 @@ + t = t->parts->next; + t->type = TYPEAPPLICATION; + t->subtype = safe_strdup ("pgp-signature"); + t->filename = safe_strdup (sigfile); + t->use_disp = 0; + t->disposition = DISPNONE; + t->encoding = ENC7BIT; + t->unlink = 1; /* ok to remove this file after sending. */ ++ mutt_set_parameter ("name", "signature.asc", &t->parameter); + + return (a); + } + + static short is_numerical_keyid (const char *s) + { + /* or should we require the "0x"? */ + if (strncmp (s, "0x", 2) == 0) |