%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Summary:	Moovida Media Center
Summary(ja):	Moovida メディアセンター
Name:		moovida
Version:	1.0.9
Release: 	1%{?_dist_release}

Source0:	http://www.moovida.com/media/public/%{name}-%{version}.tar.gz
Source1:	moovida.desktop
Patch0:		moovida-1.0.7-disable-auto-update.patch
License:	GPLv3 and MIT
Group:		Applications/Multimedia
URL:		http://www.moovida.com/

Requires:	gstreamer-python, pygtk2, pigment, python-cssutils
# Base, split off the required files to build the plugins to avoid a dependency loop
Requires:	moovida-base = %{version}-%{release}
# Plugins. The bad are actually mandatory (they contain the GUI for instance)
Requires:	moovida-plugins-good = %{version}
Requires:	moovida-plugins-bad = %{version}
Requires:	moovida-plugins-ugly = %{version}
# Intentionally dropped. Is this really usefull? I don't like it...
#Requires:	libvisual, libvisual-plugins

BuildRequires:	glib2-devel, gtk2-devel, python-devel, pygtk2-devel
BuildRequires:	python-twisted, python-setuptools
BuildRequires:	gstreamer-devel, gstreamer-plugins-base-devel
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
Buildarch:	noarch
Obsoletes:	elisa

Packager:	kazutaka

%description
Moovida is an open source cross-platform media center solution designed
to be simple for people not particularly familiar with computers. With

Moovida you can enjoy:
- Watch your pictures with previews and nicely animated slideshows.
- Watch your movies and video clips as well as online ones.
- Manage your music collection by artists or albums covers.
- Moovida finds automatically medias on your network, from network
  drives, ITunes, Windows Mediaplayer, Rhythmbox, etc.
- Detects automatically iPods, cameras, USB hard drives, etc.

%description -l ja
Moovida は PC が得意ではない人でも使えるようシンプルにデザインされた、
オープンソースのクロス・プラットフォームなメディアセンター・アプリ
ケーションです。

Moovida でできること:
- プレビューやきれいなアニメーション付きのスライドショーで写真を楽しむ。
- ストレージ上やウェブ上にある映画やビデオクリップを楽しむ。
- アーティスト名やアルバム名で音楽のコレクションを管理する。
- Moovida は ネットワークドライブや ITunes、Windows メディアプレイヤー、
  Rhythmbox 等の LAN 上のメディアを自動的に見つけます。
- iPods やデジカメ、USB ハードディスク等を自動的に検出します。

#-----------------------------------------------------------------------------

%package	base
Summary:	Base files for the Moovida Media Center
Summary(ja):	Moovida メディアセンター用の基本ファイル
Group:		Applications/Multimedia
Requires:	python-setuptools, python-imaging, gnome-python-extras
Requires:	python-twisted, pyxdg, xdg-user-dirs
Obsoletes:	elisa-base

# The whole point of having this base package is to split off the basic files
# which are required to build the plugins, since those plugins are runtime
# required by the main "moovida" package (avoid a dependency loop)

%description base
Base files for the Moovida Media Center.

%description base -l ja
Moovida メディアセンター用の基本ファイルです。

#-----------------------------------------------------------------------------

%prep
%setup -q -n elisa-%{version}
%patch0 -p1 -b .disable-auto-update

%build
%{__python} setup.py build


%install
%{__rm} -rf ${RPM_BUILD_ROOT}
%{__python} setup.py install \
            --single-version-externally-managed \
            --root ${RPM_BUILD_ROOT}

# install desktop file
%{__install} -m 644 -D %{SOURCE1} ${RPM_BUILD_ROOT}%{_datadir}/applications

# create empty plugins directory
%{__mkdir_p} ${RPM_BUILD_ROOT}%{python_sitelib}/elisa/plugins

# create sym link for elisa -> moovida as temporary workaround
%{__ln_s} elisa ${RPM_BUILD_ROOT}/%{_bindir}/moovida

# remove Windows only utility
%{__rm} -rf ${RPM_BUILD_ROOT}%{python_sitelib}/elisa/core/utils/mswin32


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


%files
%defattr(-,root,root)
%doc AUTHORS FAQ FIRST_RUN NEWS README RELEASE TRANSLATORS
#%doc docs/*.txt
%{_bindir}/elisa
%{_bindir}/moovida
%{_datadir}/applications/moovida-mobile.desktop
%{_datadir}/applications/moovida.desktop
%{_datadir}/dbus-1/services/com.fluendo.elisa.service
%{_datadir}/icons/moovida.png
%{_datadir}/pixmaps/moovida.png
%{_mandir}/man1/moovida.1.gz

%files base
%defattr(-,root,root)
%doc COPYING LICENSE*
%{python_sitelib}/elisa/
%{python_sitelib}/elisa-*.egg-info/
%{python_sitelib}/elisa-*-nspkg.pth


%changelog
* Sat Dec 05 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.0.9-1
- new upstream release

* Sun Nov 22 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.0.8-1
- new upstream release

* Fri Sep 18 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.0.7-1
- new upstream release
- update patch0 against latest release

* Mon Aug 10 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.0.6-1
- new upstream release

* Sun Jun 21 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.0.3-2
- fix typo in Obsoletes: for moovida-base

* Sat Jun 20 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 1.0.3-1
- new upstream release with new name
- add Obsoletes: elisa, elisa-base
- add Source1: moovida.desktop with japanese tranlation

* Fri May 01 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.5.37-1
- new upstream release

* Thu Apr 23 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.5.36-1
- new upstream release

* Thu Apr 09 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.5.35-1
- new upstream release

* Wed Apr 01 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.5.34-1
- new upstream release

* Tue Mar 17 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.5.32-1
- new upstream release

* Fri Mar 13 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.5.31-1
- new upstream release

* Sun Mar 01 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.5.29-1
- new upstream release

* Fri Feb 20 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.5.28-1
- new upstream release

* Fri Feb 06 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.5.26-1
- new upstream release
- add patch0 to disable automatic plugin update

* Tue Jan 27 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.5.25-1
- new upstream release

* Wed Jan 21 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.5.24.1-1
- new upstream release

* Sat Jan 17 2009 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.5.23-1
- new upstream release
- add Requires: elisa-plugins-guly (is mandatory now)

* Sat Dec 27 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.5.22-2
- update dependency information

* Wed Dec 24 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.5.22-1
- new upstream release

* Thu Dec 04 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.5.20-1
- new upstream release

* Mon Oct 27 2008 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 0.5.17-1
- initial build for Vine Linux
