File KittehPlayer.spec of Package KittehPlayer
#
# spec file for package KittehPlayer
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#
Name: KittehPlayer
Version: 0~git20200514.d6364ce
Release: 0
Summary: Qt video player based on libmpv
License: MPL-2.0
Group: Productivity/Multimedia/Video/Players
URL: https://github.com/NamedKitten/KittehPlayer
Source0: %{name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE use-system-libs.patch
Patch0: use-system-libs.patch
BuildRequires: ImageMagick
BuildRequires: cmake
%if 0%{?suse_version} > 1500
BuildRequires: gcc-c++
%else
BuildRequires: gcc8-c++
%endif
BuildRequires: hicolor-icon-theme
BuildRequires: libQt5Gui-private-headers-devel
BuildRequires: cmake(Qt5Core)
BuildRequires: cmake(Qt5Gui)
BuildRequires: cmake(Qt5Concurrent)
BuildRequires: cmake(Qt5Qml)
BuildRequires: cmake(Qt5Quick)
BuildRequires: cmake(Qt5Widgets)
BuildRequires: cmake(Qt5X11Extras)
# see why it's not being linked to
BuildRequires: cmake(spdlog) >= 1.3.1
BuildRequires: pkgconfig(mpv) >= 1.28.0
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xext)
%description
A video player based on Qt, QML and libmpv with themes for many online video players.
%prep
%autosetup -p1
%build
export CXX=g++
test -x "$(type -p g++-8)" && export CXX=g++-8
%cmake
%cmake_build
%install
%cmake_install
for s in 16 24 32 48 64 96 128 192 256 512; do
mkdir -pv %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps
convert -strip -resize ${s}x${s} %{name}.svg %{buildroot}%{_datadir}/icons/hicolor/${s}x${s}/apps/%{name}.png
done
install -Dm0644 %{name}.svg -pv %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%files
%license LICENSE.txt
%doc README.md
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.*
%changelog