Sophie

Sophie

distrib > Mandriva > 2007.0 > x86_64 > media > main-updates-src > by-pkgid > 5d2d8c71a0335c1ba5392d091861b370 > files > 17

mutt-1.5.11-5.2mdv2007.0.src.rpm

# THIS PACKAGE IS IN SVN
# PLEASE DO NOT UPLOAD BEFORE FIRST COMMITING
# BACK YOUR CHANGES

%define subrel		2
%define release		%mkrel 5

# GNU libidn support for i18n'ed domain names
# no effect for now, mutt expects old version of libidn
%define enable_idn	0
%{?_with_idn: %global enable_idn 1}

# compile against kerberos
%define enable_krb5	0
%{?_with_kerberos: %global enable_krb5 1}
# enable sasl2
# note that sasl2 includes kerberos support via sasl
%define enable_sasl2	1

%define _requires_exceptions perl(timelocal.pl)

Name:		mutt
Summary:	Text mode mail user agent
Version:	1.5.11
Release:	%{release}
License:	GPL
Epoch:		1
Group:		Networking/Mail
URL:		http://www.mutt.org/
Buildroot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
Source:		ftp://ftp.mutt.org/pub/mutt/%{name}-%{version}.tar.gz
Source1:	ftp://ftp.mutt.org/pub/mutt/%{name}-%{version}.tar.gz.asc
# To make use of bzip2/gzip files
Source10:	%{name}-Muttrc_compressed_folders.foot.bz2

#
# NOTE: For any patch that modifies Muttrc, please modify Muttrc.head.in
# instead, because Muttrc is automatically generated, so any change will
# be lost
#

#
# Patch 1-99: Mandrake patches
#

# Set tmpdir to ~/tmp in sample config
Patch1:		%{name}-1.3.15-tmpdef.patch

# Tell user to install urlview instead of just barf at user
Patch2:		%{name}-1.5.6-urlview.patch

# Allow non root users to install mutt
Patch3:		%{name}-1.5.5.1-no-sgid.patch

# Don't include /usr/include/ncurses if not building against normal ncurses
Patch4:		%{name}-1.5.5.1-ncurses-include.patch

# fixes the viewing of MIME attached files when the mailcap
# entry already uses quotes (eg: "%s")
Patch5:		mutt-1.5.11-mailcap.patch

# defines gpg paths, aspell, and fallback charsets
Patch6:		mutt-1.5.11-gpg.patch

#
# Patch 100- : external patches
#

# Compressed folder support, http://www.spinnaker.de/mutt/compressed/
# http://www.mutt.org.ua/download/mutt-%{pversion}/patch-%{pversion}.rr.compressed.gz
Patch100:	patch-1.5.11.rr.compressed.1

# NNTP support
# http://www.mutt.org.ua/download/mutt-%{version}/patch-%{version}.vvv.nntp.gz
Patch101:	patch-1.5.11.vvv.nntp

# Save history to file, http://www.vinc17.org/mutt/#resources
# http://www.vinc17.org/mutt/patch-1.5.6.vl.savehist.1
Patch102:	%{name}-1.5.6-save-history.patch

# Dynamically set xterm window title / icon name
Patch104:	%{name}-1.5.5.1-xterm-title.patch
# http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-3242
# http://dev.mutt.org/cgi-bin/viewcvs.cgi/mutt/imap/browse.c?r1=1.34.2.2&r2=1.34.2.3&makepatch=1&diff_format=u
Patch105:	%{name}-1.5.11-CVE-2006-3242.patch
Patch106:	mutt-1.5.5.1-CVE-2006-5298.patch
Patch107:	mutt-1.5.X-CVE-2006-5297.patch
Patch108:	mutt-1.5.14-CVE-2007-1558.patch
Patch109:	mutt-1.5.14-CVE-2007-2683.patch

BuildRequires:	bzip2-devel
BuildRequires:	linuxdoc-tools
BuildRequires:	ncurses-devel
BuildRequires:	libncursesw-devel
BuildRequires:	openssl-devel
BuildRequires:	sendmail-command
# the new nntp patch can now use these versions
BuildRequires:	autoconf2.5 automake1.8
# required by the header cache patch
BuildRequires:  libdb-devel >= 4.2
%if %enable_krb5
BuildRequires:	krb5-devel
%endif
%if %enable_sasl2
BuildRequires:	libsasl-devel >= 2.1
%endif
# http://archives.mandrakelinux.com/cooker/2005-06/msg01987.php
Requires:	sendmail-command

# It won't compile when sasl/sasl2 support is required in addition to pop
#BuildRequires:	libsasl2-devel
#if %enable_idn
#BuildRequires:	idn-devel
#endif


%description
Mutt is a text mode mail user agent. Mutt supports color, threading,
arbitrary key remapping, and a lot of customization.

You should install mutt if you've used mutt in the past and you prefer
it, or if you're new to mail programs and you haven't decided which
one you're going to use.

%package	utf8
Summary:	Text mode mail user agent supporting wide character
Group:		Networking/Mail
Requires:	%{name} = %{epoch}:%{version}-%{release}

%description	utf8
Mutt is a text mode mail user agent. Mutt supports color, threading,
arbitrary key remapping, and a lot of customization.

You should install mutt if you've used mutt in the past and you prefer
it, or if you're new to mail programs and you haven't decided which
one you're going to use.

NOTE: This version of mutt is linked against ncurses with wide char
      support, and is useful for, say, people using UTF-8 locales.

%prep
%setup -q
%patch1 -p1 -b .tmpdef
%patch2 -p1 -b .urlview
%patch3 -p1 -b .no-sgid
%patch4 -p1 -b .no-ncurses-normal
%patch5 -p1 -b .mailcap
%patch6 -p1 -b .gpg
%patch100 -p1 -b .cfp
%patch101 -p1 -b .nntp
%patch102 -p1 -b .history
%patch104 -p1 -b .xterm-title
%patch105 -p1 -b .CVE-2006-3242
%patch106 -p1 -b .cve-2006-5298
%patch107 -p1 -b .cve-2006-5297
%patch108 -p1 -b .cve-2007-1558
%patch109 -p1 -b .cve-2007-2683

# needed by nntp patch
aclocal -I m4
autoheader
cd m4
make -f Makefile.am.in
cd ..
automake --foreign
autoconf

# Append changes to Muttrc to make use of bzip2/gzip mbox
bzip2 -cd %{SOURCE10} >> Muttrc.head.in

# Fix some bad references in the man pages
# Reference to imapd is not fixed, since uw-imap/courier/cyrus all have
# different paths
perl -pi -e 's|/usr/local/bin|%{_bindir}|g; s|/usr/local/doc/mutt|%{_docdir}/%{name}-%{version}|g;' doc/*.man init.h

%build

build()
{
	CONFIGURE_TOP=.. %configure2_5x \
	--with-docdir=%{_docdir}/%{name}-%{version}	\
	--enable-pop		\
	--enable-imap		\
	--enable-imap-edit-threads	\
	--enable-nfs-fix	\
	--with-ssl		\
	--enable-compressed	\
	--enable-hcache		\
	--without-gdbm		\
	--with-bdb		\
	--enable-pgp		\
	--enable-smime		\
%if %enable_krb5
	--with-gss 		\
%else
	--without-gss 		\
%endif
%if %enable_sasl2
	--with-sasl 		\
%else
	--without-sasl	 	\
%endif
	$@ 			\
	--enable-nntp

	%make
}

# build normal version
### ugly. ugly.
perl -pi -e 's/ncurses ncursesw/ncurses # ncursesw/' configure
mkdir mutt-normal
pushd mutt-normal
build
popd

# build another version enabling wide char support
### ugly. ugly.
perl -pi -e 's/ncurses # ncursesw/ncurses ncursesw/' configure
mkdir mutt-utf-8
pushd mutt-utf-8
build

# "make install" installs $builddir/Muttrc into $buildroot
make update-doc
#mv -f Muttrc ../Muttrc

popd

%install
rm -rf %{buildroot}

pushd mutt-utf-8
%makeinstall_std
mv %{buildroot}%{_bindir}/mutt %{buildroot}%{_bindir}/mutt-utf8
popd

pushd mutt-normal
install -m 755 mutt %{buildroot}%{_bindir}/mutt-normal
popd

# get rid of unpackaged files
rm -f $RPM_BUILD_ROOT%{_sysconfdir}/mime.types

%find_lang %{name}

%post
update-alternatives --install %{_bindir}/mutt mutt %{_bindir}/mutt-normal 10

%preun
if [ $1 -eq 0 ]; then
  update-alternatives --remove mutt %{_bindir}/mutt-normal
fi

%post utf8
update-alternatives --install %{_bindir}/mutt mutt %{_bindir}/mutt-utf8 20

%preun utf8
if [ $1 -eq 0 ]; then
  update-alternatives --remove mutt %{_bindir}/mutt-utf8
fi

%triggerpostun -- %{name} < %{epoch}:1.5
update-alternatives --install %{_bindir}/mutt mutt %{_bindir}/mutt-normal 10

%clean
rm -rf %{buildroot}

%files -f %{name}.lang
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/Muttrc
%doc %{_docdir}/%{name}-%{version}
%doc %{_mandir}/man?/*
%{_bindir}/flea
%{_bindir}/mutt-normal
%{_bindir}/muttbug
%{_bindir}/pgpewrap
%{_bindir}/pgpring
%{_bindir}/smime_keys
%attr(2755, root, mail) %{_bindir}/mutt_dotlock

%files utf8
%defattr(-,root,root)
%{_bindir}/mutt-utf8



%changelog
* Mon Jun 04 2007 Vincent Danen <vdanen@mandriva.com> 1:1.5.11-5.2mdv2007.0
- P108: security fix for CVE-2007-1558
- P109: security fix for CVE-2007-2683

* Thu Oct 26 2006 Stew Benedict <sbenedict@mandriva.com> 1:1.5.11-5.1mdv2007.0
- P106: security fix for CVE-2006-5298
- P107: security fix for CVE-2006-5297

* Mon Sep 18 2006 Gwenole Beauchesne <gbeauchesne@mandriva.com> 1:1.5.11-5mdv2007.0
- Rebuild

* Fri Jun 30 2006 Andreas Hasenack <andreas@mandriva.com>
+ 2006-06-30 09:56:19 (38203)
- bunzipped the remaining patches
- added security patch for CVE-2006-3242 (#23424)

* Fri Jun 30 2006 Andreas Hasenack <andreas@mandriva.com>
+ 2006-06-30 09:45:38 (38201)
- import mutt-1.5.11-3mdv2007.0

* Tue May 30 2006 Pablo Saratxaga <pablo@mandriva.com> 1.5.11-3mdk
- use aspell instead of ispell
- set paths to gpg, so it works out of the box (if gpg installed)
- corrected bug when calling external programs to view attached files

* Sun Nov 13 2005 Oden Eriksson <oeriksson@mandriva.com> 1.5.11-2mdk
- rebuilt against openssl-0.9.8a

* Fri Sep 30 2005 Andreas Hasenack <andreas@mandriva.com> 1.5.10i-1mdk
- updated to version 1.5.11 (no "i" from now on)
- removed thread patch, already applied
- updated nntp patch
- updated compressed folders patch

* Tue Aug 30 2005 Frederic Lepied <flepied@mandriva.com> 1.5.9i-9mdk
- removed BuildRequires on ispell as it's not in main anymore

* Tue Jul 26 2005 Nicolas Lécureuil <neoclust@mandriva.org> 1.5.9i-8mdk
- Fix smtpdaemon on BuildRequire
- % mkrel

* Mon Jul 11 2005 Andreas Hasenack <andreas@mandriva.com> 1.5.9i-7mdk
- changed Requires from smtpdaemon to sendmail-command

* Mon Apr 25 2005 Andreas Hasenack <andreas@mandrivalinux.com> 1.5.9i-6mdk
- updated to version 1.5.9i
- removed P5, it's already fixed in this version
- updated compressed folder patch for this version
- updated nntp patch for this version
- removed hcache patch, the imap part is already applied and is actually
  the more important one (maildir is already fast)
- redid edit-threads patch for this version
- updated save_history patch to version 1.5.6 (latest available at this time)
- using current autoconf/automake now as it is compatible with the new nntp
  patch version

* Tue Mar 29 2005 Andreas Hasenack <andreas@mandrakesoft.com> 1.5.6i-5mdk
- just a rebuild and a release increase, since the last package never went
  into cooker

* Sun Mar 13 2005 Andreas Hasenack <andreas@mandrakesoft.com> 1.5.6i-4mdk
- added conditional sasl2 build (enabled by default) (Closes: #14221)
- added configure options to honor kerberos build which was previously
  only relying on a buildrequires
- since mutt is built twice, use a shell function instead of calling
  configure/make "inline"
- added header cache patch with the Makefile.am hunk slightly modified
  because of the nntp patch
- added libdb4.2-devel buildrequires because of the header_cache patch.
  This patch can use either BDB or GDBM: I prefer BDB.
- added P5 to fix #13020

* Wed Jan 12 2005 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 1.5.6i-3mdk
- fix buildrequires

* Tue Jun 01 2004 Marcel Pol <mpol@mandrake.org> 1.5.6i-2mdk
- buildrequires autoconf2.1 (slbd)

* Fri Apr 16 2004 Abel Cheung <deaddog@deaddog.org> 1.5.6i-1mdk
- New version
- Regen patches

* Sun Jan 25 2004 Abel Cheung <deaddog@deaddog.org> 1.5.5.1i-2mdk
- Modify patch2 (urlview) and patch101 (nntp) so that they don't modify
  Muttrc, then Muttrc would be regen'ed (Thanks to Luca Berra)
- Patch103: Dynamically break threads apart or combine threads
- Patch104: Sets xterm title (Thanks Olav Vitters
  <olav AT bkor DOT dhs DOT org>)

* Fri Jan 23 2004 Abel Cheung <deaddog@deaddog.org> 1.5.5.1i-1mdk
- 1.5.5.1i
- Build alternate version against ncurses that supports wide char
- Renumber patches (probably better patch management is needed later)
- Updated compressed folder patch
- Patch101: NNTP support
- Patch102: Save history to file (~/.mutthistory by default)
- Get rid of menu entry

* Thu Oct 09 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 1.4.1i-3mdk
- fix deps