diff options
-rw-r--r-- | network/nmh/README | 10 | ||||
-rw-r--r-- | network/nmh/doinst.sh | 13 | ||||
-rw-r--r-- | network/nmh/nmh.SlackBuild | 88 | ||||
-rw-r--r-- | network/nmh/nmh.info | 8 | ||||
-rw-r--r-- | network/nmh/slack-desc | 19 |
5 files changed, 138 insertions, 0 deletions
diff --git a/network/nmh/README b/network/nmh/README new file mode 100644 index 0000000000000..1e3d2a583063a --- /dev/null +++ b/network/nmh/README @@ -0,0 +1,10 @@ +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. + +This build includes configure options for setting up nmh with GNU +Emacs' MH-E frontend. diff --git a/network/nmh/doinst.sh b/network/nmh/doinst.sh new file mode 100644 index 0000000000000..19a6ff6ac8545 --- /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 0000000000000..7f706de314342 --- /dev/null +++ b/network/nmh/nmh.SlackBuild @@ -0,0 +1,88 @@ +#!/bin/sh + +# SlackBuild for New MH System (nmh) +# Joel J. Adamson <adamsonj@email.unc.edu> + +PRGNAM=nmh +VERSION=1.3 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +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" +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 . +chmod -R u+w,go+r-w,a-s . + +CFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc/nmh \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --with-perl=/usr/bin/perl \ + --enable-mhe \ + --with-editor=emacsclient \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $(find . -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 MACHINES 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.tgz diff --git a/network/nmh/nmh.info b/network/nmh/nmh.info new file mode 100644 index 0000000000000..3cbc2285482d9 --- /dev/null +++ b/network/nmh/nmh.info @@ -0,0 +1,8 @@ +PRGNAM="nmh" +VERSION="1.3" +HOMEPAGE="http://www.nongnu.org/nmh/" +DOWNLOAD="http://download.savannah.nongnu.org/releases/nmh/nmh-1.3.tar.gz" +MD5SUM="a52d1f93e780d7a045207451ce6c9a4e" +MAINTAINER="Joel J. Adamson" +EMAIL="adamsonj@email.unc.edu" +APPROVED="rworkman" diff --git a/network/nmh/slack-desc b/network/nmh/slack-desc new file mode 100644 index 0000000000000..d8d22ee305706 --- /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 ':'. + + |-----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/ |