# XXX use of _libdir appears incorrect, should be _libexecdir? %define _usrlibdir %{_prefix}/lib %define _libdir %{_usrlibdir}/nmh %{expand: %%define _sysconfdir %{_sysconfdir}/nmh} Summary: A capable mail handling system with a command line interface. Name: nmh Obsoletes: mh Provides: mh Version: 1.0.4 Release: 4mdk Copyright: freeware 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 # # 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} 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 %patch0 -p0 -b .config %patch1 -p0 -b .buildroot # # 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 ... # export LIBS=-ldb1 %configure --with-editor=/bin/vi --with-mts=sendmail 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 { cd ${RPM_BUILD_ROOT} strip `file .%{_bindir}/* | grep ELF | cut -d':' -f 1` # XXX tmac.h is needed by nmh man pages, move to %{_mandir} echo '.\" ---> This file is in %{_mandir} because it is sourced by nmh man pages.' > .%{_mandir}/tmac.h cat .%{_sysconfdir}/tmac.h >> .%{_mandir}/tmac.h perl -pi -e 's/^\.so \/etc\/nmh\/tmac.h/.so tmac.h/' .%{_mandir}/man*/* rm -f .%{_sysconfdir}/tmac.h # XXX unnecessary because DOT_LOCKING is disabled # chown root.mail .%{_bindir}/inc # chmod 2755 .%{_bindir}/inc chmod g-s .%{_bindir}/inc } %clean rm -rf ${RPM_BUILD_ROOT} %post if [ ! -d %{_bindir}/mh -a ! -L %{_bindir}/mh ] ; then ln -s . %{_bindir}/mh fi if [ ! -d %{_usrlibdir}/mh -a ! -L %{_usrlibdir}/mh ] ; then ln -s nmh %{_usrlibdir}/mh fi if [ -d /etc/smrsh -a ! -L /etc/smrsh/slocal ] ; then ln -sf %{_libdir}/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 %{_usrlibdir}/mh -a ! -L %{_usrlibdir}/mh ] ; then ln -s nmh %{_usrlibdir}/mh fi %preun if [ $1 = 0 ]; then [ ! -L %{_bindir}/mh ] || rm -f %{_bindir}/mh [ ! -L %{_usrlibdir}/mh ] || rm -f %{_usrlibdir}/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} %config (noreplace) %{_sysconfdir}/* # XXX use of _libdir appears incorrect, should be libexecdir? %dir %{_libdir} %{_libdir}/* %{_mandir}/tmac.h* %{_mandir}/man[158]/* %changelog * 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