File phonon4qt5-backend-vlc.spec of Package phonon4qt5-backend-vlc

#
# spec file for package phonon4qt5-backend-vlc
#
# Copyright (c) 2018 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:           phonon4qt5-backend-vlc
Version:        0.10.1
Release:        0
Summary:        Phonon VLC Backend
License:        LGPL-2.1+
Group:          Development/Libraries/KDE
Url:            http://phonon.kde.org/
%define filename phonon-backend-vlc
%define _phonon4qt5_version 4.7.0
Source:         http://download.kde.org/stable/phonon/%{filename}/%{version}/%{filename}-%{version}.tar.xz
BuildRequires:  alsa-devel
BuildRequires:  cmake
BuildRequires:  kf5-filesystem
BuildRequires:  pkgconfig
BuildRequires:  vlc-devel >= 2.1.0
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Widgets)
BuildRequires:  pkgconfig(phonon4qt5) >= %{_phonon4qt5_version}
Requires:       libphonon4qt5 => %{_phonon4qt5_version}
Requires:       vlc-noX >= %( echo `rpm -q --queryformat '%%{VERSION}' vlc-devel`)
Conflicts:      vlc-noX >  %( echo `rpm -q --queryformat '%%{VERSION}' vlc-devel | cut -f -2 -d .`.99)
Provides:       phonon4qt5-backend = %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Phonon is a cross-platform portable Multimedia Support Abstraction,
which allows you to play multiple audio or video formats with the same
quality on all platforms, no matter which underlying architecture is
used.

This is the VLC backend for Phonon

%prep
%setup -q -n phonon-vlc-%{version}

%build
  %cmake_kf5 -d build -- -DPHONON_BUILD_PHONON4QT5=ON
  %make_jobs

%install
  %kf5_makeinstall -C build

%post
%if 0%{?suse_version} >= 1500
%{_libdir}/vlc/vlc-cache-gen %{_libdir}/vlc/plugins
%else
%{_libdir}/vlc/vlc-cache-gen -f %{_libdir}/vlc/plugins
%endif

%files
%defattr(-,root,root)
%doc COPYING.LIB AUTHORS
%dir %{_kf5_plugindir}/phonon4qt5_backend
%{_kf5_plugindir}/phonon4qt5_backend/phonon_vlc.so

%changelog