File kaffeine.spec of Package kaffeine

#
# spec file for package kaffeine
#
# Copyright (c) 2016 SUSE LINUX 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:           kaffeine
Version:        2.0.4
Release:        0
Summary:        Xine-Based Multimedia Player
License:        GPL-2.0+
Group:          Productivity/Multimedia/Video/Players

Url:            http://kaffeine.kde.org/
# http://sourceforge.net/projects/kaffeine/files/current/kaffeine-1.2.2.tar.gz
Source0:        kaffeine-%{version}.tar.xz
# PATCH-FEATURE-OPENSUSE kaffeine-fixsplitter.patch -- GUI improvement (allow more flexibly set splitters)
Patch0:         kaffeine-fixsplitter.patch
# PATCH-FIX-OPENSUSE initial-preference.diff cmorve69@yahoo.es -- Add InitialPreference to set it as the default video player
Patch1:         initial-preference.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif
BuildRequires:  extra-cmake-modules
BuildRequires:  kcoreaddons-devel
BuildRequires:  kdbusaddons-devel
BuildRequires:  ki18n-devel
BuildRequires:  kidletime-devel
BuildRequires:  kio-devel
BuildRequires:  knotifications-devel
BuildRequires:  kwidgetsaddons-devel
BuildRequires:  kxmlgui-devel
BuildRequires:  libv4l-devel
BuildRequires:  libdvbv5-devel
BuildRequires:  vlc-devel
BuildRequires:  solid-devel
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Sql)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(Qt5X11Extras)
BuildRequires:  pkgconfig(xscrnsaver)

%description
Kaffeine plays all files and devices supported by Xine. For example,
MPEG files, AVI (if the codec being used is supported by Xine), MP3,
and Ogg Vorbis. It also handles Video CDs, DVDs, and DVB cards.

%prep
%setup -q -n kaffeine-%{version}
%patch0
%patch1

%build
%cmake_kf5 -d build
%make_jobs

%install
%kf5_makeinstall -C build

%if 0%{?suse_version}
# place desktop entry in video and tv
%suse_update_desktop_file -r org.kde.kaffeine Qt KDE AudioVideo Video Player TV
%endif

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc COPYING COPYING-DOCS Changelog NOTES
%_kf5_bindir/dtvdaemon
%_kf5_bindir/kaffeine
%dir %_kf5_sharedir/appdata
%_kf5_sharedir/appdata/org.kde.kaffeine.appdata.xml
%_kf5_applicationsdir/org.kde.kaffeine.desktop
%_kf5_iconsdir/hicolor/*/*/*
%_kf5_sharedir/kaffeine/
%_kf5_sharedir/profiles/
%_kf5_sharedir/solid/

%changelog