network/nmh: Added (The New Message Handler).

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Leonard Schmidt 2014-08-15 23:13:24 +07:00 committed by Willy Sudiarto Raharjo
parent c9fbdbee2b
commit b46b72adf9
5 changed files with 145 additions and 0 deletions

7
network/nmh/README Normal file
View File

@ -0,0 +1,7 @@
nmh (new MH) is a powerful electronic mail handling system. nmh
consists of a collection of fairly simple single-purpose programs
to send, receive, save, retrieve, and manipulate e-mail
messages. Since nmh is a suite rather than a single monolithic
program, you may freely intersperse nmh commands with other
commands at your shell prompt, or write custom scripts which use
these commands in flexible ways.

13
network/nmh/doinst.sh Normal file
View File

@ -0,0 +1,13 @@
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
# toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}

View File

@ -0,0 +1,96 @@
#!/bin/sh
# SlackBuild for New MH System (nmh)
# Joel J. Adamson <adamsonj@email.unc.edu>
#
# Updated for 1.6 by Leonard Schmidt <lems@gmx.net>
PRGNAM=nmh
VERSION=${VERSION:-1.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
rm -rf $TMP/$PRGNAM-$VERSION
cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/libexec/nmh \
--sysconfdir=/etc/nmh \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/nmh-$VERSION \
--infodir=/usr/info \
--with-cyrus-sasl \
--with-tls \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a INSTALL README COPYRIGHT DATE NEWS MACHINES VERSION docs/ $PKG/usr/doc/$PRGNAM-$VERSION
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
# Let's not clobber config files
( cd $PKG/etc/nmh
for i in * ; do
mv $i $i.new
printf "config etc/nmh/$i.new\n" >> $PKG/install/doinst.sh
done
printf "\n" >> $PKG/install/doinst.sh
)
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

10
network/nmh/nmh.info Normal file
View File

@ -0,0 +1,10 @@
PRGNAM="nmh"
VERSION="1.6"
HOMEPAGE="http://www.nongnu.org/nmh/"
DOWNLOAD="http://download.savannah.nongnu.org/releases/nmh/nmh-1.6.tar.gz"
MD5SUM="766ff2d37736aef76243df9c6610cb77"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="Leonard Schmidt"
EMAIL="lems@gmx.net"

19
network/nmh/slack-desc Normal file
View File

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler-------------------------------------------------------|
nmh: nmh (The New Message Handler)
nmh:
nmh: nmh (new MH) is a powerful electronic mail handling system. nmh
nmh: consists of a collection of fairly simple single-purpose programs
nmh: to send, receive, save, retrieve, and manipulate e-mail
nmh: messages. Since nmh is a suite rather than a single monolithic
nmh: program, you may freely intersperse nmh commands with other
nmh: commands at your shell prompt, or write custom scripts which use
nmh: these commands in flexible ways.
nmh:
nmh: http://www.nongnu.org/nmh/