Summary: A capable mail handling system with a command line interface. Name: nmh Obsoletes: mh Provides: mh Version: 1.0.4 Release: 9mdk License: BSD-style Url: http://www.mhost.com/nmh/ Group: Networking/Mail Source0: ftp://ftp.mhost.com/pub/nmh/nmh-%{version}.tar.bz2 Source1: procmailrc.example Patch0: nmh-1.0.3-config.patch.bz2 Patch1: nmh-1.0.3-buildroot.patch.bz2 Patch4: nmh-1.0.4-db1.patch.bz2 Patch5: nmh-1.0.4-uttype.patch.bz2 # # XXX this patch was applied to nmh-0.27 and is included for reference. Patch2: nmh-0.27-security.patch.bz2 Patch3: nmh-1.0.3-compat21.patch.bz2 # XXX needs to find dbm_{open,fetch,store,close} BuildRequires: db1-devel BuildRequires: flex BuildRequires: libtermcap-devel # We don't want to pick up some other db lib. BuildConflicts: libgdbm-devel db2-devel BuildRoot: %{_tmppath}/%{name}-root %description Nmh is an email system based on the MH email system and is intended to be a (mostly) compatible drop-in replacement for MH. Nmh isn't a single comprehensive program. Instead, it consists of a number of fairly simple single-purpose programs for sending, receiving, saving, retrieving and otherwise manipulating email messages. You can freely intersperse nmh commands with other shell commands or write custom scripts which utilize nmh commands. If you want to use nmh as a true email user agent, you'll want to also install exmh to provide a user interface for it--nmh only has a command line interface. If you'd like to use nmh commands in shell scripts, or if you'd like to use nmh and exmh together as your email user agent, you should install nmh. %prep %setup -q # ugly hack to link against db1 %patch4 -p1 -b .db1 %patch0 -p0 -b .config %patch1 -p0 -b .buildroot %patch5 -p1 -b .uttype # # XXX this patch was applied to nmh-0.27 and is included for reference. #%patch2 -p1 -b .security %patch3 -p0 -b .compat21 # XXX add promailrc.example cp %SOURCE1 . %build # XXX is this still needed? breaks on 5.2 ... %configure --with-editor=/bin/vi --with-mts=sendmail \ --libdir=%_libdir/nmh \ --sysconfdir=%_sysconfdir/nmh make %install rm -rf ${RPM_BUILD_ROOT} # XXX unnecessary because DOT_LOCKING is disabled make DESTDIR=${RPM_BUILD_ROOT} MAIL_SPOOL_GRP=$(id -gn) install install man/tmac.h $RPM_BUILD_ROOT%_mandir { cd ${RPM_BUILD_ROOT} # XXX tmac.h is needed by nmh man pages, move to %{_mandir} perl -pi -e 's/^\.so \/etc\/nmh\/tmac.h/.so tmac.h/' .%{_mandir}/man*/* } %clean rm -rf ${RPM_BUILD_ROOT} %post #fix a man nmh and man comp prb bunzip2 %{_mandir}/tmac.h.bz2 if [ ! -d %{_bindir}/mh -a ! -L %{_bindir}/mh ] ; then ln -s . %{_bindir}/mh fi if [ ! -d %{_libdir}/mh -a ! -L %{_libdir}/mh ] ; then ln -s nmh %{_libdir}/mh fi if [ -d /etc/smrsh -a ! -L /etc/smrsh/slocal ] ; then ln -sf %{_libdir}/%{name}/slocal /etc/smrsh/slocal fi %triggerpostun -- mh, nmh <= 0.27-7 if [ ! -d %{_bindir}/mh -a ! -L %{_bindir}/mh ] ; then ln -s . %{_bindir}/mh fi if [ ! -d %{_libdir}/mh -a ! -L %{_libdir}/mh ] ; then ln -s nmh %{_libdir}/mh fi %preun if [ $1 = 0 ]; then [ ! -L %{_bindir}/mh ] || rm -f %{_bindir}/mh [ ! -L %{_libdir}/mh ] || rm -f %{_libdir}/mh [ ! -d /etc/smrsh -a -L /etc/smrsh/slocal ] || rm -f /etc/smrsh/slocal fi %files %defattr(-,root,root) %doc COMPLETION-* COPYRIGHT DIFFERENCES FAQ MAIL.FILTERING README TODO VERSION %doc procmailrc.example %{_bindir}/* %dir %{_sysconfdir}/nmh %config (noreplace) %{_sysconfdir}/nmh/* # XXX use of _libdir appears incorrect, should be libexecdir? %dir %{_libdir}/nmh %{_libdir}/nmh/* %{_mandir}/tmac.h* %{_mandir}/man[158]/* %changelog * Thu Sep 04 2003 Florin <florin@mandrakesoft.com> 1.0.4-9mdk - /usr/lib/nmh/slocal instead of /usr/lib/slocal in the scripts * Fri Sep 06 2002 Florin <florin@mandrakesoft.com> 1.0.4-8mdk - add the uttype patch (thx to Marc Boucher) - add url entry - better licence description (IMHO) - s/(useless)_usrlibdir/_libdir * Tue Aug 06 2002 Geoffrey Lee <snailtalk@mandrakesoft.com> 1.0.4-7mdk - Make this build. - Clean up ugliness in spec. * Sun Sep 09 2001 Stefan van der Eijk <stefan@eijk.nu> 1.0.4-6mdk - BuildRequires: db1-devel db2-devel flex libtermcap-devel * Fri Aug 10 2001 Florin <florin@mandrakesoft.com> 1.0.4-5mdk - fix the Copyright entry - fix the man nmh/comp prb (thx to J.Leifer for the bug summit) * Thu Aug 31 2000 Florin <florin@mandrakesoft.com> 1.0.4-4mdk - some mixture between the mandrake package and the RedHat one * Wed Jul 12 2000 Prospector <bugzilla@redhat.com> - automatic rebuild * Thu Jun 22 2000 Bill Nottingham <notting@redhat.com> - talk to sendmail, not to a local SMTP server * Thu Jun 15 2000 Jeff Johnson <jbj@redhat.com> - FHS packaging. - remove /etc/nmh/tmac.h, as it is now in %{_mandir}/tmac.h. - Exclude ia64 for now. * Sun Apr 16 2000 Bernhard Rosenkraenzer <bero@redhat.com> - 1.0.4 * Mon Feb 28 2000 Jeff Johnson <jbj@redhat.com> - security fix for mime remote exploit. - permit tmac.h to be sourced for nmh man pages to "work". - add procmailrc.example in /usr/doc * Tue Feb 22 2000 Jeff Johnson <jbj@redhat.com> - diddle %preun exit code to return 0 when sendmail is not installed (#9651). * Mon Feb 7 2000 Bill Nottingham <notting@redhat.com> - handle compressed manpages * Tue Jun 1 1999 Jeff Johnson <jbj@redhat.com> - add /etc/smrsh/slocal symlink to permit slocal functionality. (#3181). * Mon May 31 1999 Jeff Johnson <jbj@redhat.com> - update to nmh-1.0. * Sun Apr 18 1999 <ewt@redhat.com> - fixed mh compatibility symlinks on removal * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> - auto rebuild in the new build environment (release 7) * Tue Jan 26 1999 Jeff Johnson <jbj@redhat.com> - restore /usr/bin files to package. * Wed Jan 13 1999 Jeff Johnson <jbj@redhat.com> - fix reversed args in strncpy within security patch (#821). * Sun Jan 10 1999 Jeff Johnson <jbj@redhat.com> - turn off remnant setgid root.mail (which packaged as setgid root.root because of %defattr in %files) (bug #769). - glibc-2.1 compatibility. * Sat Jul 18 1998 Jeff Johnson <jbj@redhat.com> - update to 0.27 (security patches too) * Sun May 3 1998 Alan Cox <alan@redhat.com> - Fixed the obvious security holes. Im not sure I got them all, I may have broken a couple of things in the process. The code is such a complete pile of donkey poo it is hard to be sure. * Fri Apr 24 1998 Prospector System <bugs@redhat.com> - translations modified for de, fr, tr * Sun Apr 19 1998 Erik Troan <ewt@redhat.com> - removed /usr/bin/mh and /usr/lib/mh from file list -- create them in scripts instead to avoid conflicts with the old mh package * Sat Apr 11 1998 Donnie Barnes <djb@redhat.com> - various spec file cleanups * Wed Apr 8 1998 Bryan C. Andregg <bandregg@redhat.com> - Fixed symlink install bug * Tue Mar 31 1998 Bryan C. Andregg <bandregg@redhat.com> - Added symlinks: /usr/bin/mh -> /usr/bin, /usr/lib/mh -> /usr/lib/nmh * Wed Mar 25 1998 Bryan C. Andregg <bandregg@redhat.com> - Initial build