virt-viewer/virt-viewer.spec.in
Michael Weghorn 4676c57486 Make app-id and desktop file name match
The application uses an application-id of
"org.virt-manager.virt-viewer" (see function
remote_viewer_new in src/remote-viewer.c).

So far, there was a mismatch between this
application-id and the desktop file name,
resulting e.g. in no proper window icon being
used when running the app on KDE Plasma Wayland.

Adjust the name of the desktop and appdata
files to match the application-id as expected.

Also update the translatable strings using this
command:

    ninja -C _build virt-viewer-pot

Fixes: https://gitlab.com/virt-viewer/virt-viewer/-/issues/135
Signed-off-by: Michael Weghorn <m.weghorn@posteo.de>
2024-02-13 15:48:54 +01:00

95 lines
2.2 KiB
RPMSpec

# -*- rpm-spec -*-
%if 0%{?rhel} >= 9
%global with_govirt 0
%global with_spice 0
%else
# Disabled due to incompatible govirt/librest
%if 0%{?fedora} >= 37
%global with_govirt 0
%else
%global with_govirt 1
%endif
%global with_spice 1
%endif
Name: virt-viewer
Version: @VERSION@
Release: 1%{?dist}
Summary: Virtual Machine Viewer
License: GPL-2.0-or-later
URL: https://gitlab.com/virt-viewer/virt-viewer
Source0: https://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.xz
Requires: openssh-clients
# Our bash completion script uses virsh to list domains
Requires: libvirt-client
BuildRequires: gcc
BuildRequires: meson
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(libvirt)
BuildRequires: pkgconfig(libvirt-glib-1.0)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(gtk-vnc-2.0)
BuildRequires: pkgconfig(vte-2.91)
%if %{with_spice}
BuildRequires: pkgconfig(spice-client-gtk-3.0)
BuildRequires: pkgconfig(spice-protocol)
%endif
BuildRequires: /usr/bin/pod2man
BuildRequires: gettext
%if %{with_govirt}
BuildRequires: pkgconfig(govirt-1.0)
BuildRequires: pkgconfig(rest-0.7)
%endif
BuildRequires: pkgconfig(bash-completion)
%description
Virtual Machine Viewer provides a graphical console client for connecting
to virtual machines. It uses the GTK-VNC or SPICE-GTK widgets to provide
the display, and libvirt for looking up VNC/SPICE server details.
%prep
%autosetup -p1
%build
%define buildid_opt -Dbuild-id=%{release}
%if !%{with_govirt}
%define ovirt_opt -Dovirt=disabled
%endif
%if !%{with_spice}
%define spice_opt -Dspice=disabled
%endif
%if 0%{?rhel} > 0
%define osid_opt -Dos-id=rhel%{?rhel}
%endif
%meson %{buildid_opt} %{?ovirt_opt} %{?spice_opt} %{?osid_opt}
%meson_build
%install
%meson_install
%find_lang %{name}
%files -f %{name}.lang
%doc README.md COPYING AUTHORS NEWS
%{_bindir}/%{name}
%{_bindir}/remote-viewer
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/applications/org.virt-manager.virt-viewer.desktop
%{_datadir}/metainfo/org.virt-manager.virt-viewer.appdata.xml
%{_datadir}/mime/packages/virt-viewer-mime.xml
%{_mandir}/man1/virt-viewer.1*
%{_mandir}/man1/remote-viewer.1*
%{_datadir}/bash-completion/completions/virt-viewer
%changelog