File deepin-music-player.spec of Package deepin-music-player

#
# spec file for package deepin-music-player
#
# Copyright (c) 2013 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:           deepin-music-player
Summary:        Deepin Music Playe 
License:        GPL-3.0+
Group:          Productivity/Multimedia/Sound/Players
Version:        1.0.1git20120911
Release:        0
BuildArch:      noarch
Url:            http://packages.linuxdeepin.com/deepin/pool/main/d/deepin-music-player/
Source0:        %{name}-%{version}.tar.gz
Source1:        deepin-music-player.desktop
Source2:        deepin-music-player.png
BuildRequires:  fdupes
BuildRequires:  python-devel
BuildRequires:  update-desktop-files
Requires:       deepin-ui
Requires:       python-chardet
Requires:       python-gtk
Requires:       python-imaging
Requires:       python-mutagen
Requires:       python-pyquery
Requires:       python-scipy
Requires:       python-xlib
Recommends:     %{name}-lang = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{py_requires}

%description
Deepin Music Player with brilliant and tweakful UI Deepin-UI based, 
gstreamer front-end, with features likes search music by pinyin, 
quanpin, colorful lyrics supports, and more powerful functions 
you will found.

%lang_package

%prep
%setup -q 

%build
cd locale
msgfmt zh_CN.po -o zh_CN.mo
msgfmt zh_HK.po -o zh_HK.mo
msgfmt zh_TW.po -o zh_TW.mo
msgfmt ru_RU.po -o ru_RU.mo

%install
chmod 644 AUTHORS
chmod 644 COPYING
mkdir -p %{buildroot}/%{_datadir}/applications
mkdir -p %{buildroot}/%{_datadir}/icons
mkdir -p %{buildroot}/%{_datadir}/%{name}
mkdir -p %{buildroot}/%{_datadir}/locale/zh_CN/LC_MESSAGES/
mkdir -p %{buildroot}/%{_datadir}/locale/zh_HK/LC_MESSAGES/
mkdir -p %{buildroot}/%{_datadir}/locale/zh_TW/LC_MESSAGES/
mkdir -p %{buildroot}/%{_datadir}/locale/ru_RU/LC_MESSAGES/
mkdir -p %{buildroot}/%{_bindir}
cp %{S:1} %{buildroot}/%{_datadir}/applications/
cp %{S:2} %{buildroot}/%{_datadir}/icons/
cp -R app_theme %{buildroot}/%{_datadir}/%{name}
cp -R skin %{buildroot}/%{_datadir}/%{name}
cp -R src %{buildroot}/%{_datadir}/%{name}
cp locale/zh_CN.mo %{buildroot}/%{_datadir}/locale/zh_CN/LC_MESSAGES/%{name}.mo
cp locale/zh_HK.mo %{buildroot}/%{_datadir}/locale/zh_HK/LC_MESSAGES/%{name}.mo
cp locale/zh_TW.mo %{buildroot}/%{_datadir}/locale/zh_TW/LC_MESSAGES/%{name}.mo
cp locale/ru_RU.mo %{buildroot}/%{_datadir}/locale/ru_RU/LC_MESSAGES/%{name}.mo

%fdupes %{buildroot}
%find_lang %{name}

%suse_update_desktop_file -r %{name} Player AudioVideo

cd %{buildroot}/%{_bindir}
ln -s ../share/%{name}/src/main.py %{name}

%files 
%defattr(-, root, root, -)
%doc AUTHORS COPYING
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/%{name}.png
%{_datadir}/%{name}
%{_bindir}/%{name}

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by