Summary: A Perl mail-to-HTML converter
Summary(ja): Eメールを HTML 形式に変換する Perl ツール
Name: MHonArc
Version: 2.6.18
Release: 1%{?_dist_release}
License: GPLv2+
Group: Applications/Text
URL: http://www.mhonarc.org/
Source0: http://www.mhonarc.org/tar/%{name}-%{version}.tar.bz2

Provides: perl(readmail.pl)
Requires: perl >= 5.6
Requires: perl-Unicode-String perl-Unicode-MapUTF8
BuildRequires: perl >= 5.6
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root


%description
MHonArc provides HTML mail archiving with index, mail thread linking, etc; plus
other capabilities including support for MIME and powerful user customization
features. 

%description -l ja
MHonArc は，メールを HTML アーカイブに変換するツールで，
インデックス，メールのスレッドのリンク，その他 MIME サポートや
強力なカスタマイズ機能を備えています．


%prep
rm -rf %{buildroot}

%setup -q

%build
for i in `find . -type f -name *.pl` admin/mhaadmin* mh* examples/* ; do
	sed -e 's|/usr/local/|/usr/|g' $i >${i%.*}.new
	mv ${i%.*}.new $i
done


%install
rm -rf %{buildroot}

perl install.me -batch -libpath %{buildroot}%{_libdir}/MHonArc -nodoc \
	-manpath %{buildroot}%{_mandir} -binpath %{buildroot}%{_bindir}

# just in case
cd %{buildroot}
find . -type f -exec perl -pi -e "s|%{buildroot}||g" {} \;


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root)
%doc ACKNOWLG BUGS CHANGES COPYING INSTALL README.txt RELNOTES TODO
%doc doc contrib examples extras logo
%{_bindir}/*
%{_libdir}/MHonArc
%{_mandir}/*/*


%changelog
* Fri Apr 22 2011 IWAI, Masaharu <iwai@alib.jp> 2.6.18-1
- new upstream release
- drop Source1: upstream fixed
- add Provides: perl(readmail.pl)

* Sun Feb 15 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.6.16-3
- spec in utf-8
- add Source1 to fix iso2022jp.pl

* Mon Apr 28 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.6.16-2vl5
- removed Source1 (for perl(shellwords.pl))
- fix license tag

* Mon Apr 28 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.6.16-1vl5
- rebuilt with perl 5.10.0-1
- added Source1 (for perl(shellwords.pl))

* Mon Jul 17 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.6.16-0vl1
- new upstream release
- added Requires: perl-Unicode-String, perl-Unicode-MapUTF8

* Wed Jul 01 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.6.11-0vl1
- new upstream release

* Tue Sep 02 2003 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.6.8-0vl1
- updated to 2.6.8 release

* Wed Apr 23 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.5.14-0vl3
- fixed spec file encoding (fixed to EUC)

* Thu Dec 26 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.5.14-0vl2
- Oops, fixed NOT to requires /usr/local/bin/perl :(

* Thu Dec 26 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2.5.14-0vl1
- based on 2.5.10-1mdk from Mandrake/9.0 Contrib and built for Vine Linux
- added Japanese summary and description
- 2.5.14 is a security fix release

* Tue Jul 30 2002 Lenny Cartier <lenny@mandrakesoft.com> 2.5.10-1mdk
- 2.5.10

* Mon Jul 22 2002  Lenny Cartier <lenny@mandrakesoft.com> 2.5.9-1mdk
- 2.5.9

* Fri Jul 12 2002 Pixel <pixel@mandrakesoft.com> 2.5.7-2mdk
- remove "AutoReqProv: no" (it doesn't change anything)
- rebuild for new perl 5.8.0

* Mon Jun 24 2002 Lenny Cartier <lenny@mandrakesoft.com> 2.5.7-1mdk
- 2.5.7

* Tue Jun 18 2002 Lenny Cartier <lenny@mandrakesoft.com> 2.5.6-1mdk
- 2.5.6

* Tue May 28 2002 Christian Belisle <cbelisle@mandrakesoft.com> 2.5.5-1mdk
- 2.5.5
- quiet the %%setup

* Tue Apr 30 2002 Lenny Cartier <lenny@mandrakesoft.com> 2.5.3-1mdk
- 2.5.3

* Wed Jun 20 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.4.9-1mdk
- License
- updated to 2.4.9

* Sat Apr 14 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.4.8-1mdk
- Build a 2.4.8.

* Tue Jan 02 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.4.7-2mdk
- clean spec

* Fri Nov 03 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.4.7-1mdk
- shamelessly ripped from RedHat contribs.
 
* Fri Feb 18 2000 Yuri Detzel <yad@mail.ru>
- Updated to version 2.4.5
- Fixed rewriting and deleting files in lib directory
  during building of RPM package
- Updated to new url of MHonArc home page
    
* Wed Aug 18 1999 Chuck Mead <csm@lunar-penguin.com>
- Updated to version 2.4.3
     
* Sat Jun 26 1999 Jeff Breidenbach <jeff@alum.mit.edu>
- Updated to version 2.4.0
      
* Wed Nov 18 1998 Jeff Breidenbach <jeff@alum.mit.edu>
- Added utilities to RPM (mha-dbedit, mha-dbrecover)
       
* Wed Nov 11 1998 Jeff Breidenbach <jeff@alum.mit.edu>
- Removed "BuildRoot:" to fix path problem.
        
* Mon Nov 9 1998 Jeff Breidenbach <jeff@alum.mit.edu>
- updated to version 2.3.3
- updated Perl requirement to perl 5.
- Removed RPM patch; used install.me command line options instead
	 
* Tue Oct 27 1998 Jeff Breidenbach <jeff@alum.mit.edu>
- updated to version 2.3.1
	  
* Wed Apr 1 1998 Stig HackV舅 <stig@hackvan.com>
- removed bogus "%dep" macro from %install script
- removed bogus %doc tags from the /usr/{bin,lib} files
- moved to noarch architecture
	   
* Wed Mar 3 1998 Jeff Breidenbach <jeff@jab.org>
- built new version under RedHat Hurricane w/ glibc
	    
* Wed Nov 19 1997 Greg Boehnlein <damin@nacs.net>
- rebuilt under RedHat Mustang w/ glibc
	     
* Sat Nov 08 1997 Andrew Pimlott <pimlott@math.harvard.edu>
- started from a contrib'ed RPM for version 1.2.3.  There was no
  identification of the original packager.
- lots of clean-up
- BuiltRoot'ed  
