From b46b72adf941ecf437f720c6ef40df80342aa4e3 Mon Sep 17 00:00:00 2001 From: Leonard Schmidt Date: Fri, 15 Aug 2014 23:13:24 +0700 Subject: network/nmh: Added (The New Message Handler). Signed-off-by: Willy Sudiarto Raharjo --- network/nmh/README | 7 ++++ network/nmh/doinst.sh | 13 +++++++ network/nmh/nmh.SlackBuild | 96 ++++++++++++++++++++++++++++++++++++++++++++++ network/nmh/nmh.info | 10 +++++ network/nmh/slack-desc | 19 +++++++++ 5 files changed, 145 insertions(+) create mode 100644 network/nmh/README create mode 100644 network/nmh/doinst.sh create mode 100644 network/nmh/nmh.SlackBuild create mode 100644 network/nmh/nmh.info create mode 100644 network/nmh/slack-desc (limited to 'network/nmh') diff --git a/network/nmh/README b/network/nmh/README new file mode 100644 index 0000000000..76789a2590 --- /dev/null +++ b/network/nmh/README @@ -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. diff --git a/network/nmh/doinst.sh b/network/nmh/doinst.sh new file mode 100644 index 0000000000..19a6ff6ac8 --- /dev/null +++ b/network/nmh/doinst.sh @@ -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... +} + diff --git a/network/nmh/nmh.SlackBuild b/network/nmh/nmh.SlackBuild new file mode 100644 index 0000000000..7373ce7148 --- /dev/null +++ b/network/nmh/nmh.SlackBuild @@ -0,0 +1,96 @@ +#!/bin/sh + +# SlackBuild for New MH System (nmh) +# Joel J. Adamson +# +# Updated for 1.6 by Leonard Schmidt + +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} diff --git a/network/nmh/nmh.info b/network/nmh/nmh.info new file mode 100644 index 0000000000..a5d7f59353 --- /dev/null +++ b/network/nmh/nmh.info @@ -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" diff --git a/network/nmh/slack-desc b/network/nmh/slack-desc new file mode 100644 index 0000000000..c3ffa268b7 --- /dev/null +++ b/network/nmh/slack-desc @@ -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/ -- cgit v1.2.3