Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > media > contrib-release-src > by-pkgid > 9ab0fde0ada851088dda6d4c7e05e1d0 > files > 6

nmh-1.2-4mdv2009.0.src.rpm

Summary:	A capable mail handling system with a command line interface
Name:		nmh
Version:	1.2
Release:	%mkrel 4
License:	BSD-style
URL:		http://savannah.nongnu.org/projects/nmh/
Group:		Networking/Mail
Source0:	ftp://ftp.mhost.com/pub/nmh/nmh-%{version}.tar.bz2
Source1:	procmailrc.example
Patch0:		nmh-1.0.3-compat21.patch
Patch1:		nmh-1.2-prefer_db4.patch
# from debian
Patch2:		04-fix-64bit-issues-399271.dpatch
Patch3:		05-segfault-399271.dpatch
BuildRequires:	db4-devel
BuildRequires:	flex
BuildRequires:	libtermcap-devel
BuildRequires:	libtool
BuildRequires:	sendmail-command
BuildRequires:	vim-minimal
Provides:	mh
Obsoletes:	mh
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 .compat21
%patch1 -p0 -b .prefer_db4
%patch2 -p1 -b .fix-64bit-issues-399271
%patch3 -p1 -b .segfault-399271

# XXX add promailrc.example
cp %SOURCE1 .

%build
autoconf

# XXX is this still needed? breaks on 5.2 ...
%configure \
    --with-editor=/bin/vi \
    --with-mts=sendmail \
    --libdir=%{_libdir}/nmh \
    --sysconfdir=%{_sysconfdir}/nmh \
    --with-locking=fcntl

make

%install
rm -rf %{buildroot}

# XXX unnecessary because DOT_LOCKING is disabled
make DESTDIR=%{buildroot} MAIL_SPOOL_GRP=$(id -gn) install

%clean
rm -rf %{buildroot}

%post
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 docs/COMPLETION-* docs/DIFFERENCES docs/FAQ docs/MAIL.FILTERING docs/TODO docs/README* COPYRIGHT README 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}/man[158]/*


%changelog
* Tue Jul 29 2008 Thierry Vignaud <tvignaud@mandriva.com> 1.2-4mdv2009.0
+ Revision: 254015
- rebuild

* Thu Jan 03 2008 Olivier Blin <oblin@mandriva.com> 1.2-2mdv2008.1
+ Revision: 141006
- restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request
    - fix summary-ended-with-dot

* Sat Sep 29 2007 Oden Eriksson <oeriksson@mandriva.com> 1.2-2mdv2008.0
+ Revision: 93847
- attempt to fix #26612 (Various nmh components segfault) by adding two debian patches


* Sun Jan 07 2007 Crispin Boylan <crisb@mandriva.org> 1.2-1mdv2007.0
+ Revision: 105162
- Fix files list
- tmac.h no longer needed
- New version, drop patches 0,1,5. Update patch 4.  New URL
- Import nmh

* Sat Jul 15 2006 Oden Eriksson <oeriksson@mandriva.com> 1.0.4-10mdk
- rebuild