File sonata.spec of Package sonata

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

Name:           sonata
Version:        1.6.2.1
Release:        4%{?dist}
Summary:        An elegant GTK+ client for the Music Player Daemon (MPD)
Group:          Applications/Multimedia
License:        GPLv3+
URL:            http://sonata.berlios.de/
Source0:        http://download.berlios.de/sonata/sonata-%{version}.tar.bz2
Patch0:         sonata-1.6.2-nocleaning.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  desktop-file-utils
BuildRequires:  python-gtk-devel gtk2-devel
BuildRequires:  python-devel
BuildRequires:  gettext
BuildRequires:  fdupes
Requires:       python-gtk dbus-1-python
Requires:       python-mpd
Requires:       python-tag
%description
Sonata is a lightweight GTK+ music client for the Music Player Daemon (MPD).
It aims to be efficient (no toolbar, main menu, or statusbar), user-friendly,
and clean.

Features:
 - Expanded and collapsed views
 - Automatic remote or local album art
 - Automatic fetching of lyrics
 - Playlist and stream support
 - Support for editing tags
 - System tray icon with tooltip
 - Optional popup notification
 - Library searching by artist, song, etc.
 - Keyboard friendly
 - Support for multimedia keys
 - Commandline control

%prep
%setup -q
#workaround very odd cleaning at the end of setup.py
%patch0 -p1 -b .nocleaning

%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT --prefix %{_prefix}

%find_lang %{name}

desktop-file-install --vendor="OBS home:tivo"                   \
        --dir=${RPM_BUILD_ROOT}%{_datadir}/applications         \
        --remove-category Application                           \
        --remove-key Version                                    \
        --delete-original                                       \
        ${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop

rm -rf $RPM_BUILD_ROOT%{_datadir}/sonata
chmod 755 ${RPM_BUILD_ROOT}%{python_sitearch}/%{name}/breadcrumbs.py

%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc CHANGELOG COPYING README TODO TRANSLATORS
%{python_sitearch}/*
%{_bindir}/%{name}
%{_datadir}/applications/*.desktop
%{_datadir}/pixmaps/%{name}*
%{_mandir}/man1/%{name}.1.gz

%changelog
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.2.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 1.6.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Tue Apr 13 2010 Haïkel Guémar <hguemar@fedoraproject.org> -1.6.2.1-2
* Rebuilt for F-13

* Mon Sep 21 2009 Haïkel Guémar<karlthered@gmail.com> - 1.6.2.1-1
* Updated to 1.6.2.1

* Wed Jul 29 2009 Haïkel Guémar<karlthered@gmail.com> - 1.6.2-2
- Fixed patch name

* Mon Jul 27 2009 Haïkel Guémar <karlthered@gmail.com> - 1.6.2-1
- Updated to 1.6.2

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.5.2-2
- Rebuild for Python 2.6

* Mon Jun 16 2008 Michał Bentkowski <mr.ecik at gmail.com> - 1.5.2-1
- 1.5.2

* Fri May 09 2008 Michał Bentkowski <mr.ecik at gmail.com> - 1.5.1-1
- 1.5.1

* Sun Apr 13 2008 Michał Bentkowski <mr.ecik at gmail.com> - 1.5-2
- Now sonata requires python-mpd (bug 441114)

* Fri Apr 04 2008 Michał Bentkowski <mr.ecik at gmail.com> - 1.5-1
- 1.5
- Fix nocleaning patch to work with 1.5

* Sat Feb 09 2008 Michał Bentkowski <mr.ecik at gmail.com> - 1.4.2-1
- 1.4.2

* Sun Feb 03 2008 Michał Bentkowski <mr.ecik at gmail.com> - 1.4.1-1
- 1.4.1

* Wed Jan 16 2008 Michał Bentkowski <mr.ecik at gmail.com> - 1.4-1
- 1.4
- Now sonata puts manpage in proper directory

* Fri Jan 04 2008 Michał Bentkowski <mr.ecik at gmail.com> - 1.3-2
- Require python-ZSI

* Tue Oct 30 2007 Michał Bentkowski <mr.ecik at gmail.com> - 1.3-1
- One three

* Sun Aug 26 2007 Michał Bentkowski <mr.ecik at gmail.com> - 1.2.3-1
- One two three

* Fri Aug 24 2007 Michał Bentkowski <mr.ecik at gmail.com> - 1.2.2-2
- ppc32 rebuild
- license tag fix

* Mon Jul 23 2007 Michał Bentkowski <mr.ecik at gmail.com> - 1.2.2-1
- 1.2.2

* Mon Jul 16 2007 Michał Bentkowski <mr.ecik at gmail.com> - 1.2-2
- BR gettext

* Mon Jul 16 2007 Michał Bentkowski <mr.ecik at gmail.com> - 1.2-1
- 1.2 with audioscrobbler support

* Thu Jun 07 2007 Michał Bentkowski <mr.ecik at gmail.com> - 1.1.1-2
- Fix desktop file

* Thu Jun 07 2007 Michał Bentkowski <mr.ecik at gmail.com> - 1.1.1-1
- Update to 1.1.1

* Wed May 09 2007 Michał Bentkowski <mr.ecik at gmail.com> - 1.1-1
- Update to 1.1

* Sat Feb 17 2007 Michał Bentkowski <mr.ecik at gmail.com> - 1.0.1-3
- Rebuild

* Wed Feb 14 2007 Michał Bentkowski <mr.ecik at gmail.com> - 1.0.1-2
- Add dbus-python and gnome-python2-libegg dependencies

* Wed Feb 14 2007 Michał Bentkowski <mr.ecik at gmail.com> - 1.0.1-1
- Update to 1.0.1
- Get rid of Application category in a more clear way

* Fri Feb 02 2007 Michał Bentkowski <mr.ecik at gmail.com> - 1.0-1
- Initial release
openSUSE Build Service is sponsored by