File haruna.spec of Package haruna
#
# spec file for package haruna
#
# Copyright (c) 2023 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/
#
Name: haruna
Version: 0.10.2
Release: 0
Summary: Video player built with Qt/QML on top of libmpv
License: CC-BY-4.0 AND GPL-3.0-or-later
URL: https://haruna.kde.org
Source0: https://download.kde.org/stable/%{name}/%{name}-%{version}.tar.xz
Source1: https://download.kde.org/stable/%{name}/%{name}-%{version}.tar.xz.sig
BuildRequires: cmake >= 3.15
BuildRequires: extra-cmake-modules >= 5.66
BuildRequires: hicolor-icon-theme
BuildRequires: libQt5Gui-private-headers-devel
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
BuildRequires: cmake(Breeze)
BuildRequires: cmake(KF5Config)
BuildRequires: cmake(KF5ConfigWidgets)
BuildRequires: cmake(KF5CoreAddons)
BuildRequires: cmake(KF5DocTools)
BuildRequires: cmake(KF5FileMetaData)
BuildRequires: cmake(KF5I18n)
BuildRequires: cmake(KF5IconThemes)
BuildRequires: cmake(KF5KIO)
BuildRequires: cmake(KF5Kirigami2)
BuildRequires: cmake(Qt5Core) >= 5.15.2
BuildRequires: cmake(Qt5DBus)
BuildRequires: cmake(Qt5Gui)
BuildRequires: cmake(Qt5Qml)
BuildRequires: cmake(Qt5Quick)
BuildRequires: cmake(Qt5QuickControls2)
BuildRequires: cmake(Qt5X11Extras)
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavfilter)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavutil)
BuildRequires: pkgconfig(libswscale)
BuildRequires: pkgconfig(mpv)
Requires: breeze5-icons
Requires: qqc2-desktop-style
Recommends: %{name}-doc
%if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150300
BuildRequires: yt-dlp
%else
BuildRequires: youtube-dl
%endif
%if 0%{?suse_version} > 1500 || 0%{?sle_version} > 150300
Requires: yt-dlp
%else
Requires: youtube-dl
%endif
%description
%{name} is a video player built with Qt/QML on top of libmpv.
%package doc
Summary: Documentation for %{name}
Group: Documentation/HTML
BuildArch: noarch
%description doc
This package includes the user guide for Haruna.
%lang_package
%prep
%autosetup -p1
%build
%cmake
%cmake_build
%install
%cmake_install
%find_lang %{name} --with-man --all-name
%{kf5_find_htmldocs}
# remove oddly-sized icons
rm -rf %{buildroot}%{_datadir}/icons/hicolor/44x44 \
%{buildroot}%{_datadir}/icons/hicolor/150x150 \
%{buildroot}%{_datadir}/icons/hicolor/310x310
%suse_update_desktop_file org.kde.haruna
%files
%license LICENSES/CC-BY-4.0.txt LICENSES/GPL-3.0-or-later.txt
%doc README.md
%{_bindir}/%{name}
%{_datadir}/applications/org.kde.haruna.desktop
%{_datadir}/icons/hicolor/*/apps/haruna.*g
%{_datadir}/metainfo/org.kde.haruna.metainfo.xml
%files doc
%doc %lang(en) %{_kf5_htmldir}/en/haruna
%files lang -f %{name}.lang
%changelog