%define xmms_generaldir %(xmms-config --general-plugin-dir)
%define bmp_generaldir %{_libdir}/bmp/General

Summary: Intelligent Multimedia Management System plugin for XMMS and BMP.
Summary(ja): XMMSとBMP用のIMMS(Intelligent Multimedia Management System)プラグイン
Name: imms
Version: 3.0.2
Release: 0vl1
License: GPL
Group: Applications/Multimedia
URL: http://www.luminal.org/phpwiki/index.php/IMMS
Source: http://dl.sf.net/imms/imms-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root

BuildRequires: XOrg-devel, gtk+-devel, glib2-devel, taglib-devel
BuildRequires: pcre-devel, xmms-devel, sqlite3-devel, zlib-devel
BuildRequires: fftw3-devel, readline-devel, beepmp-devel
BuildRequires: libglade2-devel, libtorch-devel
Requires: fftw3

%description
IMMS is an adaptive playlist plug-in for XMMS and BMP designed to simplify management
and prioritization of large collections of music.

Some of the key features include:
* Rating and playlist adjustment is done completely transparently to the user.
  IMMS is super easy to use!
* Files are indentified by paths and checksums. Even if you move them they
  still keep their ratings.
* Though mostly "good" songs will be played, ocasionally less popular songs
  will sneak in to give them a chance to earn user's favour.
* IMMS does a better job of shuffling than XMMS. It is able to recognise
  different versions of the same song and not play them in quick succession.

%description -l ja
IMMSは数多くの音楽ファイルのコレクションを簡単に管理し優先順位を付ける
ために設計されたXMMSとBMP用のプラグインです。

主要な機能は次の通りです：
* レイティングとプレイリストの調整はユーザーに対して完全に透明です。
  IMMSは非常に簡単に使えます！
* ファイルはパスとチェックサムで識別されます。ファイルを移動しても
  レイティングは保存されます。
* ほとんどは「好み」の曲ばかり演奏されますが、時折あまり聞かない曲も
  割り込み、ユーザーの気を引く機会を与えられます。
* IMMSはXMMSよりも上手なシャフリングをします。同じ曲の違うバージョンを
  識別でき、それらを短期間に連続して演奏しません。

%package -n xmms-imms
Summary: Intelligent Multimedia Management System plugin for XMMS
Summary(ja): IMMSのXMMS用プラグイン
Group: Applications/Multimedia
Requires: imms

%description -n xmms-imms
xmms-imms is an IMMS plugin for XMMS.

%description -l ja -n xmms-imms
xmms-immsはXMMS用のIMMSプラグインです。

%package -n beepmp-imms
Summary: Intelligent Multimedia Management System plugin for BMP
Summary(ja): IMMSのBMP用プラグイン
Group: Applications/Multimedia
Requires: imms

%description -n beepmp-imms
beepmp-imms is an IMMS plugin for BMP.

%description -l ja -n beepmp-imms
beepmp-immsはBMP用のIMMSプラグインです。

%prep
%setup -q -n %{name}-%{version}
#%patch0 -p1

%build
%configure --with-taglib --with-vorbis
%{__make}

%install
%{__rm} -rf ${RPM_BUILD_ROOT}
%{__install} -d ${RPM_BUILD_ROOT}%{xmms_generaldir}
%{__install} -m 0755 build/libxmmsimms2.so ${RPM_BUILD_ROOT}%{xmms_generaldir}/libxmmsimms.so
%{__install} -d ${RPM_BUILD_ROOT}%{bmp_generaldir}
%{__install} -m 0755 build/libbmpimms2.so ${RPM_BUILD_ROOT}%{bmp_generaldir}/libbmpimms.so
%{__install} -d ${RPM_BUILD_ROOT}%{_bindir}
%{__install} -m 0755 build/{analyzer,immstool,immsd,immsremote} ${RPM_BUILD_ROOT}%{_bindir}
%{__install} -d ${RPM_BUILD_ROOT}%{_datadir}/imms
%{__install} -m 0644 immsremote/immsremote.glade ${RPM_BUILD_ROOT}%{_datadir}/imms

%clean
%{__rm} -rf ${RPM_BUILD_ROOT}

%files
%defattr(-, root, root)
%doc LICENSE README INSTALL AUTHORS
%{_bindir}/*
%{_datadir}/imms/immsremote.glade

%files -n xmms-imms
%{xmms_generaldir}/libxmmsimms.so

%files -n beepmp-imms
%{bmp_generaldir}/libbmpimms.so

%changelog
* Sat Mar 11 2006 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 3.0.2-0vl1
- move immsremote.glade install directory back again
- remove unneccessary Requires

* Sat Mar 11 2006 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 3.0.2-0vl0.2
- move immsremote.glade install directory
  from (datadir)/imms to (datadir)/immsremote

* Fri Mar 10 2006 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 3.0.2-0vl0.1
- upstream release
- add BuildRequires: libglade2-devel, libtorch-devel
- drop obsolete Patch0

* Wed Jun 8 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 2.1.1-0vl2
- upstream release
- add INSTALL to %doc
- add patch0 to go through the compilation of libbmpimms.so

* Tue Apr 5 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 2.0.3-0vl2
- 1st release for VineSeedPlus

* Mon Mar 21 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 2.0.3-0vl1
- upstream release
- build with sqlite3-devel-3.1.6-0vl1

* Mon Feb 28 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 2.0.2a-0vl1
- rebuild with sqlite3-devel-3.1.3-0vl1
- add Japanese summary and description

* Sun Feb 20 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 2.0.2a-0vl0.2
- rebuild with sqlite3-devel-3.1.2-0vl0.3
- fixed lack of comma in BuildRequires

* Tue Feb 8 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 2.0.2a-0vl0.1
- upstream release

* Fri Jan 28 2005 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 2.0.2-0vl0.1
- upstream release
- remove autoreconf from %prep script

* Mon Dec 20 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 2.0.1-0vl0.5
- rebuild with beepmp-devel-0.9.7vl1

* Tue Dec 14 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 2.0.1-0vl0.4
- remove Obsoletes: xmms-imms

* Tue Dec 14 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 2.0.1-0vl0.3
- modified Summary and %description
- devided plugins into new binary package: xmms-imms and beepmp-imms

* Fri Dec 10 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 2.0.1-0vl0.2
- add libbmpimms.so to %files

* Fri Dec 10 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 2.0.1-0vl0.1
- upstream release
- create and install plugin for beepmp
- add BuildRequires: beepmp-devel
- remove real_name macro

* Fri Oct 22 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 2.0-0vl0.1
- upstream release
- change BuildRequires, drop glib-devel and add glib2-devel
- change %build section, drop autoheader, autoconf and add autoreconf
- shared library name has changed from libimms.so to libxmmsimms2.so

* Fri Oct 22 2004 KANEKO Seiji <giraffe@m2.pbc.ne.jp> 1.2b-0vl0.1
- change BuildRequires
- change %buildroot to $RPM_BUILD_ROOT
- add Requires: taglib, fftw3, pcre, xmms
- add utilities into package

* Thu Oct 07 2004 Dag Wieers <dag@wieers.com> - 1.1-2
- Fix permissions of library to include missing dependencies. (Mike Traum)

* Fri Apr 16 2004 Dag Wieers <dag@wieers.com> - 1.1-1
- Updated to release 1.1.

* Mon Dec 15 2003 Dag Wieers <dag@wieers.com> - 0.9.9-0
- Updated to release 0.9.9.

* Thu Oct 09 2003 Dag Wieers <dag@wieers.com> - 0.9.4-0
- Initial package. (using DAR)
