File metamail.spec of Package metamail

#
# spec file for package metamail (Version 2.7.19)
#
# Copyright (c) 2009 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 http://bugs.opensuse.org/
#

# norootforbuild


Name:           metamail
BuildRequires:  ncurses-devel xorg-x11 xorg-x11-devel
License:        MIT
Group:          Productivity/Networking/Email/Utilities
Requires:       sharutils
AutoReqProv:    on
Version:        2.7.19
Release:        1247
Summary:        MIME Mail Handler
Source:         metamail-2.7-19.tar.gz
Source1:        mimecheck
Source2:        mimecheck.1
Patch0:         metamail-2.7-19.dif
Patch1:         metamail-2.7-19-security.dif
Patch2:         metamail-2.7-19-getline.dif
Patch3:         metamail-2.7-19-binderman.dif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Metamail is required for reading multimedia mail messages (such as
those using the Andrew toolkit) with elm.



%prep
%setup -n metamail-2.7-19
%patch -P 1 -b .security
%patch -P 0
%patch2
%patch3

%build
    make
    make -C fonts

%install
    mkdir -p $RPM_BUILD_ROOT/usr/bin $RPM_BUILD_ROOT%_mandir/man{1,4}
    make INSTROOT=$RPM_BUILD_ROOT/usr INSTALL=install install-all
#    mkdir -p $RPM_BUILD_ROOT/usr/X11R6/lib/X11/fonts/misc
#    install -m 444 fonts/heb8x13B.pcf $RPM_BUILD_ROOT/usr/X11R6/lib/X11/fonts/misc/
#    gzip -9f $RPM_BUILD_ROOT/usr/X11R6/lib/X11/fonts/misc/heb8x13B.pcf
    install -m 755 %{S:1} $RPM_BUILD_ROOT/usr/bin/
    install -m 644 %{S:2} $RPM_BUILD_ROOT%{_mandir}/man1/
    ln -sf mimecheck $RPM_BUILD_ROOT/usr/bin/mimezip
    ln -sf mimecheck $RPM_BUILD_ROOT/usr/bin/mimebzip
    ln -sf mimecheck $RPM_BUILD_ROOT/usr/bin/mimegzip

%files
%defattr(-,root,root)
%doc README mailers.txt
#/usr/X11R6/lib/X11/fonts/misc/heb8x13B.pcf.gz
/usr/bin/audiocompose
/usr/bin/audiosend
/usr/bin/extcompose
/usr/bin/getfilename
/usr/bin/mailserver
/usr/bin/mailto
/usr/bin/mailto-hebrew
/usr/bin/metamail
/usr/bin/metasend
/usr/bin/mimeit
/usr/bin/mimencode
/usr/bin/mimecheck
/usr/bin/mimezip
/usr/bin/mimebzip
/usr/bin/mimegzip
/usr/bin/mmencode
/usr/bin/mgrep
/usr/bin/patch-metamail
/usr/bin/rcvAppleSingle
/usr/bin/richtext
/usr/bin/richtoatk
/usr/bin/showaudio
/usr/bin/showexternal
/usr/bin/shownonascii
/usr/bin/showpartial
/usr/bin/showpicture
/usr/bin/sndAppleSingle
/usr/bin/splitmail
/usr/bin/sun-audio-file
/usr/bin/sun-message
/usr/bin/sun-message.csh
/usr/bin/sun-to-mime
/usr/bin/sun2mime
/usr/bin/uudepipe
/usr/bin/uuenpipe
%doc %{_mandir}/man1/audiocompose.1.gz
%doc %{_mandir}/man1/audiosend.1.gz
%doc %{_mandir}/man1/extcompose.1.gz
%doc %{_mandir}/man1/getfilename.1.gz
%doc %{_mandir}/man1/mailto-hebrew.1.gz
%doc %{_mandir}/man1/mailto.1.gz
%doc %{_mandir}/man1/metamail.1.gz
%doc %{_mandir}/man1/metasend.1.gz
%doc %{_mandir}/man1/mgrep.1.gz
%doc %{_mandir}/man1/mime.1.gz
%doc %{_mandir}/man1/mimencode.1.gz
%doc %{_mandir}/man1/mimecheck.1.gz
%doc %{_mandir}/man1/mmencode.1.gz
%doc %{_mandir}/man1/patch-metamail.1.gz
%doc %{_mandir}/man1/richtext.1.gz
%doc %{_mandir}/man1/showaudio.1.gz
%doc %{_mandir}/man1/showexternal.1.gz
%doc %{_mandir}/man1/shownonascii.1.gz
%doc %{_mandir}/man1/showpartial.1.gz
%doc %{_mandir}/man1/showpicture.1.gz
%doc %{_mandir}/man1/splitmail.1.gz
%doc %{_mandir}/man4/mailcap.4.gz

%changelog