File mpc-qt.spec of Package mpc-qt

#
# spec file for package mpc-qt
#
# 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/
#


%define  _name  io.github.mpc_qt.mpc-qt
Name:           mpc-qt
Version:        @SERVICE@
Release:        0
Summary:        Media Player Classic Qute Theater
License:        GPL-2.0-only
Group:          Productivity/Multimedia/Video/Players
URL:            https://github.com/mpc-qt/mpc-qt
Source:         %{name}-%{version}.tar.xz
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  libboost_headers-devel-impl
BuildRequires:  pkgconfig
BuildRequires:  rsvg-convert
BuildRequires:  update-desktop-files
BuildRequires:  cmake(Qt6Core)
BuildRequires:  cmake(Qt6DBus)
BuildRequires:  cmake(Qt6Gui)
#uildRequires:  cmake(Qt6GuiPrivate)
BuildRequires:  cmake(Qt6LinguistTools)
BuildRequires:  cmake(Qt6Network)
BuildRequires:  cmake(Qt6OpenGLWidgets)
BuildRequires:  cmake(Qt6Svg)
BuildRequires:  cmake(Qt6Widgets)
BuildRequires:  pkgconfig(mpv)
BuildRequires:  pkgconfig(xtst)
BuildRequires:  libQt6Svg6
%requires_eq    libQt6Svg6

%description
Media Player Classic Qute Theater ("Mpc-Qt") is a cross-platform multimedia
player with a focus on reproducing the interface of Media Player Classic
Home Cinema ("Mpc-Hc").

#%%lang_package

%prep
%autosetup

%build
%cmake_qt6
%qt6_build

%install
%qt6_install
rm -rfv %{buildroot}%{_datadir}/doc

for i in 16 24 32 48 64 72; do
    install -dm 0755 %{buildroot}%{_datadir}/icons/hicolor/$i\x$i/apps
    rsvg-convert -h $i -w $i images/icon/%{name}.svg -o %{buildroot}%{_datadir}/icons/hicolor/$i\x$i/apps/%{name}.png
done

#%%find_lang %%{name} --with-qt

%files
%doc README.md DOCS/ipc.md
%{_bindir}/%{name}
%{_datadir}/applications/%{_name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.??g
%{_datadir}/metainfo/%{_name}.appdata.xml
%license LICENSE

#%%files lang -f %%{name}.lang
#%%dir %%{_datadir}/%%{name}
#%%dir %%{_datadir}/%%{name}/translations

%changelog
openSUSE Build Service is sponsored by