File kmplayer.spec of Package kmplayer5
#
# spec file for package kmplayer
#
# Copyright (c) 2016 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: kmplayer5
Version: 0.12.0b
Release: 0
# The documentation is GFDL.
# The files under src/moz-sdk are MPLv1.1 or GPLv2+ or LGPLv2+
# except src/moz-sdk/npruntime.h is BSD.
# The other source files carry GPL and LGPL licenses
# For instance:
# src/kmplayer.h is GPLv2+
# src/kmplayer_asx.cpp is LGPLv2
# src/kmplayer_atom.h is LGPLv2+
# and each of the other source files carry one of the above 3 licenses. So
# License: GFDL and (MPLv1.1 or GPLv2+ or LGPLv2+) and BSD and GPLv2+ and LGPLv2 and LGPLv2+
License: GPL-2.0+
Summary: Simple Frontend for MPlayer/FFMpeg/Phonon and Video Player Plugin for Konqueror
Url: http://kmplayer.kde.org/
Group: Productivity/Multimedia/Video/Players
Source0: kmplayer-%{version}.tar.xz
# PATCH-FIX-UPSTREAM
Patch0: Fix-crash-in-config-UI-setup.patch
Patch1: Use-more-target-centric-cmake-code.patch
BuildRequires: extra-cmake-modules
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: kconfig-devel
BuildRequires: kcoreaddons-devel
BuildRequires: kinit-devel
BuildRequires: ki18n-devel
BuildRequires: kdelibs4support-devel
BuildRequires: kio-devel
BuildRequires: kmediaplayer-devel
BuildRequires: kparts-devel
BuildRequires: kwidgetsaddons-devel
BuildRequires: phonon4qt5-devel
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5X11Extras)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
Recommends: MPlayer
Recommends: %{name}-lang = %{version}
%description
KMPlayer, a simple frontend for MPlayer/FFMpeg/Phonon.
It can play DVD/VCD movies, from file or url and from a video device.
KMPlayer can embed inside konqueror. Which means if you click
on a movie file, the movie is played inside konqueror.
It can also embed inside khtml, enabling movie playback inside a html page.
%lang_package
%prep
%setup -q -n kmplayer-%{version}
%patch -P0 -p1
#%%patch -P1 -p1
sed -i '/extern "C" {/d' src/npplayer.cpp
sed -i '/prtypes.h/a extern "C" {' src/npplayer.cpp
sed -i '/cmake_policy/a cmake_policy(SET CMP0004 OLD)' CMakeLists.txt
%build
%cmake_kf5 -d build -- -DCMAKE_POLICY_DEFAULT_CMP0012=NEW -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir}
%make_jobs
%install
pushd build
%kf5_makeinstall
popd #build
# Fix permissions
chmod 755 %{buildroot}%{_kf5_appsdir}/kmplayer/find-media.sh
%if 0%{?suse_version}
%suse_update_desktop_file -r org.kde.kmplayer Qt KDE AudioVideo Player
%endif
%kf5_find_lang
%kf5_find_htmldocs
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING* ChangeLog README TODO
%{_kf5_applicationsdir}/org.kde.kmplayer.desktop
%{_kf5_appsdir}/kmplayer/
%{_kf5_appstreamdir}/org.kde.kmplayer.appdata.xml
%{_kf5_bindir}/kmplayer
%{_kf5_bindir}/knpplayer
%{_kf5_bindir}/kphononplayer
%{_kf5_configdir}/kmplayerrc
%{_kf5_iconsdir}/*/*/apps/kmplayer.*
%doc %{_kf5_htmldir}/en/kmplayer/
%{_kf5_kxmlguidir}/kmplayer
%{_kf5_libdir}/libkdeinit5_kmplayer.so
%{_kf5_libdir}/libkmplayercommon.so
%{_kf5_plugindir}/kmplayerpart.so
%{_kf5_servicesdir}/kmplayer_part.desktop
%files lang -f %{name}.lang
#%defattr(-,root,root,-)
#%exclude %{_kf5_htmldir}/en/kmplayer/
%changelog