Package: nmh
Version: 1.5-release-0.2
Severity: wishlist
Tags: patch
It would be nice if update-alternatives could set up a link from mailx -> mhmail
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.4.4-grsec (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages nmh depends on:
ii libc6 2.13-33
ii libdb5.1 5.1.29-5
ii liblockfile1 1.09-4
ii libsasl2-2 2.1.25.dfsg1-4+b1
ii libssl1.0.0 1.0.1c-3
ii libtinfo5 5.9-10
ii netbase 5.0
Versions of packages nmh recommends:
ii exim4-daemon-light [mail-transport-agent] 4.80-4
Versions of packages nmh suggests:
pn exmh <none>
ii mh-book 200605-1
pn mh-e <none>
-- no debconf information
diff -urNad nmh-1.5/debian/control nmh-1.5-new/debian/control
--- nmh-1.5/debian/control 2012-07-14 08:23:50.426567793 -0400
+++ nmh-1.5/debian/control 2012-06-21 17:40:29.564787676 -0400
@@ -8,7 +8,7 @@
Package: nmh
Architecture: any
Depends: ${shlibs:Depends}, netbase (>= 3.16-1), ${misc:Depends}
-Provides: mail-reader, mh
+Provides: mail-reader, mh, mailx
Recommends: default-mta | mail-transport-agent
Suggests: exmh, mh-e, mh-book
Conflicts: mh
diff -urNad nmh-1.5/debian/postinst nmh-1.5-new/debian/postinst
--- nmh-1.5/debian/postinst 1969-12-31 19:00:00.000000000 -0500
+++ nmh-1.5/debian/postinst 2012-04-21 01:38:48.000000000 -0400
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+set -e
+
+update_alt()
+{
+ program="$1"
+ priority="$2"
+
+ bindir=/usr/bin
+ mhdir=/usr/bin/mh
+ mandir=/usr/share/man/man1
+ if [ ! -e "$bindir/mailx" ] || ! update-alternatives --display "mailx" | grep -q "${mhdir}/${program}$" ; then
+ update-alternatives --install "$bindir/mailx" mailx "$mhdir/$program" "$priority" \
+ --slave "$bindir/mail" mail "$mhdir/$program" \
+ --slave "$bindir/Mail" Mail "$mhdir/$program" \
+ --slave "$mandir/mailx.1.gz" mailx.1.gz "$mandir/$program.1.gz" \
+ --slave "$mandir/mail.1.gz" mail.1.gz "$mandir/$program.1.gz" \
+ --slave "$mandir/Mail.1.gz" Mail.1.gz "$mandir/$program.1.gz"
+
+ fi
+}
+
+
+if [ "$1" = "configure" ]; then
+ update_alt mhmail 100
+fi
+
+
+
diff -urNad nmh-1.5/debian/prerm nmh-1.5-new/debian/prerm
--- nmh-1.5/debian/prerm 1969-12-31 19:00:00.000000000 -0500
+++ nmh-1.5/debian/prerm 2012-04-21 01:17:31.000000000 -0400
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = "remove" ]; then
+ update-alternatives --remove "mailx" "/usr/bin/mh/mhmail"
+fi
+
+
+