Commits

Philipp Gesang committed 4d14fed

add mutt-nntp

Comments (0)

Files changed (4)

mutt-nntp/PKGBUILD

+# $Id: PKGBUILD 185574 2013-05-15 08:05:34Z bpiotrowski $
+# Maintainer: Philipp Gesang
+#
+# This is the default Arch PKGBUILD from the ABS tree, extended with
+# the NNTP patches by Vsevolod Volkov:
+#
+#       http://mutt.org.ua/download/mutt-1.5.21/
+#
+# The build() instructions follow the RPM spec by the patch author.
+
+pkgname=mutt-nntp
+pkgver=1.5.21
+pkgrel=1
+pkgdesc='Small but very powerful text-based mail client with NNTP patch'
+conflicts=("mutt")
+url='http://www.mutt.org/'
+license=('GPL')
+backup=('etc/Muttrc')
+arch=('i686' 'x86_64')
+optdepends=('smtp-forwarder: to send mail')
+depends=('gpgme' 'ncurses' 'openssl' 'libsasl' 'gdbm' 'libidn' 'mime-types' 'krb5')
+source=("ftp://ftp.mutt.org/mutt/devel/mutt-${pkgver}.tar.gz"
+        "pop-cachedir.patch"
+        "crypt-gpgme.patch"
+        "http://mutt.org.ua/download/mutt-${pkgver}/patch-${pkgver}.rr.compressed.gz"
+        "http://mutt.org.ua/download/mutt-${pkgver}/patch-${pkgver}.vvv.autoconf.gz"
+        "http://mutt.org.ua/download/mutt-${pkgver}/patch-${pkgver}.vvv.initials.gz"
+        "http://mutt.org.ua/download/mutt-${pkgver}/patch-${pkgver}.vvv.nntp.2.gz"
+        "http://mutt.org.ua/download/mutt-${pkgver}/patch-${pkgver}.vvv.nntp_ru.gz"
+        "http://mutt.org.ua/download/mutt-${pkgver}/patch-${pkgver}.vvv.quote.gz"
+        "http://mutt.org.ua/download/mutt-${pkgver}/patch-${pkgver}.vvv.ru.gz")
+sha512sums=('077dd8a0dd586badb836b04680052bfadd8574130f27ab11ce9cdbbe8bd5f365e0e79ae3669fad52b2754bc7a66006b242308db1f8d90edd10f6807d7c1b2d12'
+            '4b5e333f0a0d7beafb7b17f569706cc38a48047eb065c76daa51c779083feed0de45e6b65db7e3f4a914685ea3a256a7f12552c852556d6ff8feca26bab7c594'
+            '5dc6d6e16346621f62d2eaf08239dac57f0b2d09c1b04ff0e3b2b993d60d06b899932fe2f991fee3385bf7e92141ff5af309103bf267604be9c46559c9693dba'
+            'a6e7420f96f004f25c572a3f0491dcf4328d86e877dc287911e7e4bc988dcd275b78dd7d5c12d8019eafb6a8ac95809fc17cab512be21e9a52d0aaee304164f9'
+            '6cb8102a00f8f3d6e487043c129e87fad7d7904a4f72df0e3e720c2d5032d561733fa2258f909438523eb2053cf41c3624670fdaff72d2ab82fecb9f5a1d4526'
+            '210557c50c790f630236b7e1c65d569fa27ebddb90bdca924aa477aedd97c35333ae46361832775755349b6c5f50f65cdba85b3cc62d658eb5a249d0c43c321a'
+            'cb79305f356a54cec55563d79537291651f2dae00d7b4ad96e38db7488f3ee724c87df011868a892fee985b67a8e526b0209ad13b39e07b1775283b86c372df7'
+            '3506b2fadb46e8e34297f887f517da32d265be863ee39d87278143ea6359d2dc3a2acbb3bea96b420281202e6ad55ec155c81fad4d0c58e679af0c4ff3c06198'
+            'c385f3b197e1df2ff8f4ebde1c7425bd05d17a869b38721995a925a2aeeed514aefe19acad22c8d2287df2ab6a56c2cba4baae832640866b15d7210e2694c90b'
+            '76ab561d0c19b7d8ce288135a6b925377f120c1620e4a850445c0a4cbeaa1c39f6496380f28c47f96af802b6a2358598cf65305c2e00d3dd553482470b6059aa')
+
+install=install
+
+build() {
+	cd "${srcdir}/mutt-${pkgver}"
+    cat ../patch-${pkgver}.rr.compressed    | patch -p1
+    cat ../patch-${pkgver}.vvv.nntp.2       | patch -p1
+    cat ../patch-${pkgver}.vvv.initials     | patch -p1
+    cat ../patch-${pkgver}.vvv.quote        | patch -p1
+    cat ../patch-${pkgver}.vvv.ru           | patch -p1
+    cat ../patch-${pkgver}.vvv.nntp_ru      | patch -p1
+    cat ../patch-${pkgver}.vvv.autoconf     | patch -p1
+	patch -i ../pop-cachedir.patch # FS#31536
+	patch -p1 -i ../crypt-gpgme.patch # FS#31735
+    aclocal -I m4
+    autoheader
+    automake --add-missing
+    autoconf
+	./configure \
+		--prefix=/usr \
+		--sysconfdir=/etc \
+		--enable-compressed \
+		--enable-gpgme \
+		--enable-pop \
+		--enable-imap \
+		--enable-nntp \
+		--enable-smtp \
+		--enable-hcache \
+		--with-curses=/usr \
+		--with-regex \
+		--with-gss=/usr \
+		--with-ssl=/usr \
+		--with-sasl \
+		--with-slang \
+		--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
+}

mutt-nntp/crypt-gpgme.patch

+# HG changeset patch
+# User Roman Kagan <rkagan@mail.ru>
+# Date 1290506473 -10800
+# Node ID 938f0706311a6ab599d29d35447f0c70972fe7cf
+# Parent  01731fb1884ea0e1eaf9008ea9c70804b66f2363
+crypt-gpgme: actually init gpgme
+
+Recent versions of gpgme (at least the one packaged with Fedora 14,
+gpgme-1.2.0), requires proper initialization of the library before use.
+
+The initialization is done via gpgme_check_version(), and gpgme_set_locale() is
+recommended right afterwards, too (see gpgme manual for details).
+
+Otherwise gpgme_init() fails with "Not operational" error, which makes mutt
+immediately quit.
+
+diff --git a/crypt-gpgme.c b/crypt-gpgme.c
+--- a/crypt-gpgme.c
++++ b/crypt-gpgme.c
+@@ -4191,6 +4191,12 @@
+       if (mutt_any_key_to_continue (NULL) == -1)
+ 	mutt_exit(1);
+     }
++
++  gpgme_check_version (NULL);
++  gpgme_set_locale (NULL, LC_CTYPE, setlocale (LC_CTYPE, NULL));
++#ifdef LC_MESSAGES
++  gpgme_set_locale (NULL, LC_MESSAGES, setlocale (LC_MESSAGES, NULL));
++#endif
+ }
+ 
+ void pgp_gpgme_init (void)

mutt-nntp/install

+post_install() {
+	cat <<EOF
+
+==> For GPG support, add the following to your muttrc:
+==> source /etc/Muttrc.gpg.dist
+
+EOF
+}

mutt-nntp/pop-cachedir.patch

+Index: muttlib.c
+===================================================================
+--- muttlib.c	(revision 6128:eff500f87889)
++++ muttlib.c	(revision 6161:1a4c43138685)
+@@ -1961,5 +1961,6 @@
+   char *p = safe_strdup (src);
+   int rc = mutt_convert_string (&p, Charset, "utf-8", 0);
+-  strfcpy (dest, rc == 0 ? p : src, dlen);
++  /* `src' may be NULL, such as when called from the pop3 driver. */
++  strfcpy (dest, (rc == 0) ? NONULL(p) : NONULL(src), dlen);
+   FREE (&p);
+ }