File albumart.spec of Package albumart
#
# spec file for package albumart (Version 1.6.6)
#
# Copyright 2007-2009 Sami Kyöstilä <skyostil@kempele.fi>
# Copyright 2009 Buschmann <buschmann23@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
Summary: Downloads Cover Images
Name: kde3-albumart
Version: 1.6.6
Release: 2
Source0: albumart-%{version}.tar.bz2
Source1: albumart.desktop
Patch0: albumart-deprecate-update-desktop-files.patch
License: GPL-2.0
Group: Productivity/Multimedia/Sound/Utilities
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
BuildRequires: python-devel kdebindings3-python perl kdelibs3-devel
Recommends: kdebindings3-python python-imaging
Prefix: /opt/kde3
Url: http://www.unrealvoodoo.org/hiteck/projects/albumart/
%description
Album Cover Art Downloader is a utility for semi-automatically
downloading matching cover images from Amazon.com for each album
in your music collection. It saves the cover images so that they
will be automatically used by programs such as Konqueror,
various XMMS plugins, Windows Media Player, etc.
%prep
%setup -q -n albumart-%{version}
cp %{S:1} $RPM_BUILD_DIR/albumart-%{version}/share/applnk/Multimedia/albumart.desktop
%patch -P 0 -p1
%build
python setup.py build
%install
python setup.py install --root=$RPM_BUILD_ROOT \
--prefix=%{prefix} \
--install-purelib=/usr/%_lib/python2.7/site-packages/
rm -rf %{buildroot}/opt/kde3/share/doc
mkdir -p %{buildroot}/usr/share/pixmaps
mv %{buildroot}/opt/kde3/share/pixmaps/albumart.png %{buildroot}/usr/share/pixmaps
## -- fixing script without shebang -- ##
%__chmod +x %{buildroot}%{prefix}/lib/albumart/albumart.py
%__chmod -x %{buildroot}%{prefix}/lib/albumart/process.py
%__chmod -x %{buildroot}%{prefix}/lib/albumart/yahoo/search/domparsers.py
%__chmod -x %{buildroot}%{prefix}/lib/albumart/yahoo/search/webservices.py
## -- fixing wrong end of line encoding -- ##
perl -pi -e 's/\r\n/\n/g' %{buildroot}%{prefix}/lib/albumart/albumart.py
perl -pi -e 's/\r\n/\n/g' %{buildroot}%{prefix}/lib/albumart/event.py
# move to the right place
%__mkdir -p %buildroot/%{prefix}/share/applications/kde
%__mv %buildroot/opt/kde3/share/applnk/Multimedia/albumart.desktop %buildroot/%{prefix}/share/applications/kde/albumart.desktop
%files
%defattr(-,root,root)
%doc CHANGELOG COPYING README TODO
%{prefix}/bin/albumart-qt
%{prefix}/lib/albumart
%{prefix}/share/applications/kde/albumart.desktop
%{prefix}/share/apps/konqueror/servicemenus/albumart_set_cover_image.desktop
/usr/share/pixmaps/albumart.png
%dir /opt/kde3/share/apps/konqueror
%dir /opt/kde3/share/apps/konqueror/servicemenus
%dir /opt/kde3/lib
/usr/%_lib/python2.7/site-packages/albumart-*-py2.7.egg-info
%changelog