Summary:      Internet Message
Summary(ja):  インターネット・メッセージ
Name:         im
Version:      147
Release:      1%{?_dist_release}
Group:        Applications/Internet
Source:       http://tats.haun.org/im/im-%{version}.tar.gz
URL:          http://tats.haun.org/im/
Requires:     perl >= 1:5.8.2
BuildArch:    noarch
BuildRoot:    %{_tmppath}/%{name}-%{version}-root

Distribution: Vine Linux
Vendor:       Project Vine
License:      Distributable


%description
This package provides a series of user interface commands (im*
commands) and backend Perl5 libraries to integrate Email and NetNews
user interface. They are designed to be used both from Mew and on
command line.

IM is be able to access local mail folder, local/remote NetNews and
local NetNews spool.
You should install perl 5.004_jp or above to use this RPM package.

%description -l ja
電子メールとネット-ニュースのためのユーザインターフェイスを統合する
Perl5 用のライブラリとコマンドが含まれています。
Mew と コマンドラインで使用する用にデザインされています。

IMは localメールフォルダー、local/remoteのニュースグループ、そして
local のニュースグループ・スプールを取り扱います。
また、このRPMパッケージにはperl 5.6 以上が必要です。


%prep
%setup -q

%build
%define MODDIR `perl -MConfig -e 'print $Config{installvendorlib}'`
./configure --libdir=%{_sysconfdir} --prefix=%{_prefix} --with-perldir=%{MODDIR}
cd $RPM_BUILD_DIR/%{name}-%{version}/cnf.im
sed -e 's/FromDomain=.*#/FromDomain=#/' \
    -e 's/ToDomain=.*#/ToDomain=#/' SiteConfig >SiteConfig.$$
mv SiteConfig.$$ SiteConfig
cd -


%install
[ "${RPM_BUILD_ROOT}" != "/"  ] && rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/im
mkdir -p $RPM_BUILD_ROOT%{MODDIR}/IM

make prefix=$RPM_BUILD_ROOT%{_prefix} \
    libdir=$RPM_BUILD_ROOT%{_sysconfdir} \
    perldir=$RPM_BUILD_ROOT%{MODDIR} \
    install

rm -f rpm-files
echo %{MODDIR}/IM/ > rpm-files


%clean
[ "$RPM_BUILD_ROOT" != "/"  ] && rm -rf $RPM_BUILD_ROOT

%post
[ -f %{_libdir}/im/SiteConfig ] && cp %{_libdir}/im/SiteConfig %{_syscondir}/im/SiteConfig.rpmback || exit 0


%files -f rpm-files
%defattr(-, root, root)
%doc 00* dot.im man 
%doc -P cnf.im/SiteConfig
%dir %{_sysconfdir}/im
%config(noreplace) %{_sysconfdir}/im/SiteConfig
%{_bindir}/*


%changelog
* Sun Sep 28 2008 Shu KONNO <owa@bg.wakwak.com> 147-1vl5
- applied new versioning policy, spec in utf-8
- rebuilt with perl-5.10.0

* Tue Jul 11 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 147-0vl2
- rebuilt with perl-5.8.6
- used vendor_perl
- changed Group to Applications/Internet

* Wed Nov 10 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 147-0vl1
- updated to 147
- rebuilt with perl-5.8.2
- used more macros
- s/Copyright/License/

* Sat Jun 16 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
- 140-2vl4
- rebuilt with perl-5.6.1

* Wed Jun 13 2001 Jun Nishii <jun@vinelinux.org> im-140-2vl2
- build with perl-5.6

* Fri Sep  8 2000 ISHIKAWA Mutsumi <ishikawa@linux.or.jp>
 - im-140-2vl1
 - based on rpm of RedHat 7.0j.
 - fix incorrect Copyright in spec file.
 - change spec file name from im-{version}.spec to im.spec
 - SiteConfig move from /usr/lib/im to /etc/im
 - set %config /etc/im/SiteConfig
 - if /usr/lib/im/SiteConfig exist, it will be copied to
    /etc/im/SiteConfig.rpmback in %post

* Wed Apr 26 2000 Lisa Sagami <czs14350@nifty.ne.jp>
- updated im-140
- added defattr

* Wed Sep 29 1999 Yasushi Karino <kari-p@mc.kcom.ne.jp>
 - im-130-6
 - slight modifications for Vine-1.9
 - Change of my E-mail address.

* Sun Sep 12 1999 Yasushi Karino <kari-p@mc.kcom.ne.jp>
 - im-130-5
 - optional specification of "perldir=" is forgotten
   to "make install" it modified it.
 
* Sun Sep 12 1999 Yasushi Karino <kari-p@mc.kcom.ne.jp>
 - im-130-4
 - Description of the option of ".configre" and "make install"
   were modified.
 
* Sat Sep 11 1999 Yasushi Karino <kari-p@mc.kcom.ne.jp>
 - im-130-3
 - modified spec file.
 
* Mon Sep  6 1999 Yasushi Karino <kari-p@mc.kcom.ne.jp>
 - im-130-2
 - Spelling mistake was modified.
 - im-130-1
 - Only version change for stable release.

* Fri Sep  3 1999 Yasushi Karino <kari-p@mc.kcom.ne.jp>
 - im-127-0.1
 - updated to im-127

* Mon Aug 31 1999 Yasushi Karino <kari-p@mc.kcom.ne.jp>
 - im-126-1
 - first Release
