File haruna.spec of Package haruna

#
# spec file for package haruna
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#

%define qt5_version 5.15.0
%define kf5_version 5.66.0
%bcond_without released
Name:           haruna
Version:        0.7.3
Release:        0
Summary:        Open source video player
License:        GPL-3.0-or-later
Group:          Productivity/Multimedia/Video/Players
URL:            https://invent.kde.org/multimedia/haruna
Source0:        https://download.kde.org/stable/haruna/haruna-%{version}.tar.xz
%if %{with released}
Source1:        https://download.kde.org/stable/release-service/%{version}/src/%{name}-%{version}.tar.xz.sig
Source2:        applications.keyring
%endif
Patch0:         fix-mpv-build.diff
BuildRequires:  update-desktop-files
BuildRequires:  extra-cmake-modules
BuildRequires:  cmake(Qt5Core) >= 5.12.0
BuildRequires:  cmake(Qt5DBus) >= 5.12.0
BuildRequires:  cmake(Qt5Qml) >= 5.12.0
BuildRequires:  cmake(Qt5Quick) >= 5.12.0
BuildRequires:  cmake(Qt5QuickControls2) >= 5.12.0
BuildRequires:  cmake(Qt5Widgets) >= 5.12.0
BuildRequires:  cmake(KF5Config)
BuildRequires:  cmake(KF5CoreAddons)
BuildRequires:  cmake(KF5DocTools)
BuildRequires:  cmake(KF5FileMetaData)
BuildRequires:  cmake(KF5I18n)
BuildRequires:  cmake(KF5IconThemes)
BuildRequires:  cmake(KF5KIO)
BuildRequires:  cmake(KF5Kirigami2)
BuildRequires:  cmake(KF5XmlGui)
BuildRequires:  pkgconfig(mpv)
BuildRequires:  pkgconfig(libavcodec)
BuildRequires:  pkgconfig(libavdevice)
BuildRequires:  pkgconfig(libavfilter)
BuildRequires:  pkgconfig(libavformat)
BuildRequires:  pkgconfig(libavutil)
BuildRequires:  pkgconfig(libpostproc)
BuildRequires:  pkgconfig(libswscale)
Requires:       youtube-dl
Requires:       breeze5-icons
Recommends:     breeze5-style
Recommends:     libbreezecommon5-5

%description
  Haruna is an open source video player built with Qt/QML and libmpv.

%lang_package

%prep
%autosetup -p1

%build
%cmake_kf5 -d build
%cmake_build

%install
%kf5_makeinstall -C build
  %if %{with released}
    %find_lang %{name} --with-man --all-name
    %{kf5_find_htmldocs}
  %endif
  %suse_update_desktop_file -r org.kde.haruna Qt KDE AudioVideo Video Player

%files
%license LICENSES/CC-BY-4.0.txt LICENSES/GPL-3.0-or-later.txt LICENSES/WTFPL.txt
%doc README.md
%doc %lang(en) %{_kf5_htmldir}/en/haruna/
%{_kf5_bindir}/%{name}
%{_kf5_applicationsdir}/org.kde.haruna.desktop
%{_kf5_iconsdir}/hicolor/*/apps/haruna.svg
%{_kf5_appstreamdir}/org.kde.haruna.metainfo.xml

%if %{with released}
%files lang -f %{name}.lang
%endif

%changelog
openSUSE Build Service is sponsored by