File mutt.spec of Package mutt

# spec file for package mutt
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           mutt
#!BuildIgnore: sendmail
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  automake
BuildRequires:  cyrus-sasl-devel
BuildRequires:  cyrus-sasl-gssapi
BuildRequires:  docbook-xsl-stylesheets
BuildRequires:  docbook_4
BuildRequires:  gdbm-devel
BuildRequires:  glibc-i18ndata
BuildRequires:  ispell
BuildRequires:  krb5-devel
BuildRequires:  libcom_err
BuildRequires:  libgcrypt
BuildRequires:  libgpg-error-devel
BuildRequires:  libidn-devel
BuildRequires:  libxml2
BuildRequires:  libxslt
BuildRequires:  lynx
BuildRequires:  ncurses-devel
BuildRequires:  openssl-devel
BuildRequires:  postfix
BuildRequires:  sgml-skel
BuildRequires:  update-desktop-files
BuildRequires:  xli
%if 0%{?suse_version} > 1130
BuildRequires:  libassuan-devel
BuildRequires:  libgpgme-devel
BuildRequires:  gpgme-devel
Provides:       muttssl
Obsoletes:      muttssl
Recommends:     smtp_daemon
%if 0%{?suse_version} > 1130
Requires(post):   shared-mime-info
Requires(postun): shared-mime-info
# NOTE: We don't want this dependency and desktop-data-SuSE is in all
# desktop selections.
#Requires:    desktop-data-SuSE
Version:        1.5.21
Release:        0
Summary:        Mail Program
License:        GPL-2.0+
Group:          Productivity/Networking/Email/Clients
Source0:        %name-%version.tar.bz2
Source1:        Signature_conversion
Source2:        README.alternates
Source3:        mutt.png
Source4:        mutt.desktop
Source5:        skel.muttrc
Source6:        krb5-config
Source8:        %name-%version-patches.tar.bz2
Patch:          %name-%version.dif
Patch1:         patch-%version.rr.compressed.1.bz2
Patch2:         %name-1.5.9i-pgpewrap.diff
Patch3:         %name-1.5.20-sendgroupreplyto.diff
Patch4:         %name-1.5.15-wrapcolumn.diff
Patch5:         patch-
Patch6:         mutt-1.5.21.sidebar.20090619.patch
Patch7:         mutt-1.5.21-opennfs.dif
Patch8:         mutt-1.5.20-gpgme_set_locale.patch
Patch9:         bug-676388-largefile.patch
Patch10:        mutt-1.5.21-tinfo.dif
Patch11:        aw.listreply.diff
Patch12:        patch-1.5.21.vk.pgp_verbose_mime
Patch13:        automake-1.12.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%global         _sysconfdir %{_sysconfdir}

A very powerful mail user agent. It supports (among other nice things)
highlighting, threading, and PGP. It takes some time to get used to,

%setup -q -n mutt-%version -b 8
for p in ../%name-%version-patches/*; do
    test -e $p || break
    echo Patch $p
    patch -s -p1 < $p
%patch1 -p1 -b .compressed
%patch2 -p0 -b .pgpewrap
%patch3 -p1 -b .sendgroupreplyto
%patch4 -p0 -b .wrapcolumn
%patch5 -p1 -b .xtitles
%patch6 -p1 -b .sidebar
%patch7 -p0 -b .opennfs
%patch8 -p1 -b .gpgme
%patch9 -p1 -b .largefile
%patch10 -p0 -b .tinfo
%patch11 -p1 -b .listreply
%patch12 -p1 -b .pgp_verbose_mtime
%patch13 -p1 -b .automake-1.12

cp doc/Muttrc Muttrc.SuSE
cp %{S:2} .

autoreconf -fi
CFLAGS="-Wall $RPM_OPT_FLAGS -I. -D_GNU_SOURCE -fno-strict-aliasing"
CFLAGS="$CFLAGS -fstack-protector"
chmod 755 $KRB5CFGPATH
./configure $RPM_ARCH-suse-linux \
	--prefix=%{_prefix} \
	--datadir=%{_datadir} \
	--sysconfdir=%{_sysconfdir} \
	--mandir=%{_mandir} \
	--with-docdir=%{_docdir}/%name \
	--enable-imap \
	--enable-pop \
	--enable-pgp \
	--enable-gpgme \
	--enable-nfs-fix \
	--enable-mailtool \
	--enable-compressed \
	--disable-external-dotlock \
	--with-ssl=%{_prefix} \
	--with-sasl=%{_prefix} \
	--with-gss=%{_prefix} \
	--with-regex \
	--enable-smtp \
	--enable-hcache \
make -C doc clean
make -C po update-po
cp %{S:7} po/de.po
make -C doc

make install DESTDIR=%{buildroot}
mv Muttrc.SuSE %{buildroot}%{_sysconfdir}/Muttrc
install -m 755 %{S:1} %{buildroot}%{_bindir}
gzip -9 doc/manu*.txt
rm -f contrib/Makefile*
# datadir not automatically created:
mkdir -p %{buildroot}%{_datadir}/mutt
# INSTALL file should be removed:
rm -rf %{buildroot}%{_docdir}/%{name}/INSTALL
# mbox/mmdf manual page conflicts with the one from tin, so rename it
mv %{buildroot}%{_mandir}/man5/mbox.5 \
mv %{buildroot}%{_mandir}/man5/mmdf.5 \
   %find_lang %name
# We get mime.types from aaa_base
rm -f %{buildroot}%{_sysconfdir}/mime.types
# Mutt BTS is gone
rm -f %{buildroot}%{_mandir}/man1/{flea*,muttbug*}
rm -f %{buildroot}%{_bindir}/{flea,muttbug}
rm -f %{buildroot}%{_sysconfdir}/Muttrc.dist
rm -f %{buildroot}%{_sysconfdir}/mime.types.dist
mkdir -p %{buildroot}%{_datadir}/pixmaps
install -m 644 %{SOURCE3} %{buildroot}%{_datadir}/pixmaps/
mkdir -p %{buildroot}%{_datadir}/applications
install -m 644 %{SOURCE4} %{buildroot}%{_datadir}/applications/
install -D -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/skel/.muttrc
%suse_update_desktop_file mutt

#%fdupes %{buildroot}

%if 0%{?suse_version} >= 1140



%files -f %name.lang
%doc doc/manual*.html doc/manual.txt.gz COPYRIGHT README* NEWS TODO
%doc doc/PGP-Notes.txt doc/applying-patches.txt doc/devel-notes.txt
%doc contrib/
%config(noreplace) %{_sysconfdir}/skel/.muttrc
%config(noreplace) %{_sysconfdir}/Muttrc

openSUSE Build Service is sponsored by