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

#
# spec file for package deepin-music-player
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2013-2015 Hillwood Yang <hillwood@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.

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


Name:           deepin-music-player
Version:        2.90.0+git20150617.bb7889c
Release:        0
Summary:        Deepin Music Player
License:        GPL-3.0+
Group:          Productivity/Multimedia/Sound/Players
Url:            https://github.com/linuxdeepin/deepin-music
Source:         deepin-music-%{version}.tar.xz
BuildRequires:  fdupes
BuildRequires:  hicolor-icon-theme
BuildRequires:  python-devel
BuildRequires:  update-desktop-files
BuildRequires:  hicolor-icon-theme
Requires:       deepin-gsettings
Requires:       deepin-ui
Requires:       gstreamer-0_10-plugins-bad
Requires:       gstreamer-0_10-plugins-good
Requires:       python-CDDB
Requires:       python-chardet
Requires:       python-faulthandler
Requires:       python-gstreamer-0_10
Requires:       python-keybinder
Requires:       python-leveldb
Requires:       python-mutagen
Requires:       python-pycurl
Requires:       python-pyquery
Requires:       python-requests
Requires:       python-scipy
Requires:       python-xlib
Requires:       python-Pillow
Recommends:     %{name}-lang = %{version}
Recommends:     gstreamer-0_10-plugins-ffmpeg
Recommends:     gstreamer-0_10-plugins-ugly
# not currently available on openSUSE
Recommends:     python-mmkeys
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%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 -n deepin-music-%{version}

%build
make %{?_smp_mflags}

%install
make install PREFIX=%{buildroot}%{_prefix}

%suse_update_desktop_file -r %{name} Player AudioVideo

# fix symlink
rm -rf %{buildroot}%{_bindir}/%{name}
ln -sf %{_datadir}/deepin-music/src/main.py %{buildroot}%{_bindir}/%{name}

find %{buildroot} -name "*~" -delete -print

%find_lang %{name}

%fdupes %{buildroot}

%post
%icon_theme_cache_post

%postun
%icon_theme_cache_postun

%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/deepin-music
%{_datadir}/icons/hicolor/*/apps/%{name}.*

%files lang -f %{name}.lang
%defattr(-,root,root,-)

%changelog
openSUSE Build Service is sponsored by