File lrcShow-X.spec of Package lrcShow-X

#
# spec file for package lrcShow-X
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           lrcShow-X
Version:        2.1.1
Release:        1
License:        GPL-2.0+
Summary:        Application for media-players to show and search lyrics
Url:            https://launchpad.net/lrcshow-x
Group:          Productivity/Multimedia/Sound/Players
Source0:        http://launchpad.net/lrcshow-x/2-series/2.1.1/+download/lrcShow-X_2_1_1.tar.bz2
Source1:        lrcShow-X.desktop
Patch0:         FSF-address.diff
BuildRequires:  update-desktop-files
Requires:       dbus-1-python
Requires:       python < 3.0
Requires:       python >= 2.4
Requires:       python-gobject
Requires:       python-qt4
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%lang_package
%description
The main goal of lrcShow-X is to add synchronized lyrics visualization functionality to the most used
Linux media players, using existing LRC files, embedded lyrics like ID3 Sylt, Uslt, Lyrics3 and ApeTag.
It also searches for lyrics using 12 different engines among which we can mention MiniLyrics,
EvilLyrics, LrcDB and TTPlayer.
lrcShow-X is written entirely in python using pyqt4 and supporting more than ten different players like
Amarok2, Qmmp, Audacious and many other Linux Players (normally using a dbus interface).

%prep
%setup -q -n %{name}
%patch0 -p1
# Fix non-executable scripts:
sed -i "1d" advancedSearchNet.py ApeTag.py baseGui.py choose*.py define*.py embedLrc.py engines/*.py engines/ui/*.py helpBrowser.py lrc{Parser,Editor}.py mainGui.py players/*.py preference*.py readConfig.py s2t.py searchLocalLrc.py selectItem*.py settingWizard.py trackInfo.py updateConfig.py

%build
%install
install -d %{buildroot}%{_prefix}/lib/lrcShow-X
cp -a * %{buildroot}%{_prefix}/lib/lrcShow-X/
install -d %{buildroot}%{_datadir}/applications/
mkdir -p %{buildroot}/%{_datadir}/hicolor/32x32/apps/
install -m 644 icon/%{name}.png %{buildroot}/%{_datadir}/hicolor/32x32/apps/
install -m 644 %{SOURCE1} %{buildroot}%{_datadir}/applications/

# remove these problem translation files:
rm -rf %{buildroot}%{_prefix}/lib/lrcShow-X/locale/{bs,oc,ms,cy}

%suse_update_desktop_file -n %{name}
%find_lang %{name}

%files
%defattr(-,root,root,-)
%{_prefix}/lib/lrcShow-X
%{_datadir}/applications/lrcShow-X.desktop
%dir %{_datadir}/hicolor/
%dir %{_datadir}/hicolor/32x32
%dir %{_datadir}/hicolor/32x32/apps
%{_datadir}/hicolor/32x32/apps/lrcShow-X.png
%exclude %{_prefix}/lib/lrcShow-X/locale/

%files lang -f %{name}.lang
%defattr(-,root,root,-)
%dir %{_prefix}/lib/lrcShow-X/locale
%dir %{_prefix}/lib/lrcShow-X/locale/*
%dir %{_prefix}/lib/lrcShow-X/locale/*/LC_MESSAGES

%changelog