virt-viewer/virt-viewer.spec.in

121 lines
3.1 KiB
RPMSpec
Raw Normal View History

2007-07-20 23:26:08 +04:00
# -*- rpm-spec -*-
# Default to skipping autoreconf. Distros can change just this one line
# (or provide a command-line override) if they backport any patches that
# touch configure.ac or Makefile.am.
%{!?enable_autotools:%global enable_autotools 0}
2011-02-11 18:55:49 +03:00
%define with_spice 0
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6
2011-02-11 18:55:49 +03:00
%define with_spice 1
%endif
%define with_govirt 0
%define with_bash_completion 0
%if 0%{?fedora} > 19 || 0%{?rhel} >= 7
2013-05-01 20:40:06 +04:00
%define with_govirt 1
%define with_bash_completion 1
2013-05-01 20:40:06 +04:00
%endif
2007-07-20 23:26:08 +04:00
Name: @PACKAGE@
Version: @VERSION@
Release: 1%{?dist}
2007-07-20 23:26:08 +04:00
Summary: Virtual Machine Viewer
License: GPLv2+
URL: http://gitlab.com/virt-viewer/virt-viewer
2007-07-20 23:26:08 +04:00
Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
Requires: openssh-clients
Requires(post): %{_sbindir}/update-alternatives
Requires(postun): %{_sbindir}/update-alternatives
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
2007-07-20 23:26:08 +04:00
%if %{with_bash_completion}
# Our bash completion script uses virsh to list domains
Requires: libvirt-client
%endif
%if 0%{?enable_autotools}
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gettext-devel
BuildRequires: libtool
%endif
BuildRequires: gcc
BuildRequires: pkgconfig(glib-2.0) >= @GLIB2_REQUIRED@
BuildRequires: pkgconfig(gtk+-3.0) >= @GTK_REQUIRED@
BuildRequires: pkgconfig(libvirt) >= @LIBVIRT_REQUIRED@
BuildRequires: pkgconfig(libvirt-glib-1.0) >= @LIBVIRT_GLIB_REQUIRED@
BuildRequires: pkgconfig(libxml-2.0) >= @LIBXML2_REQUIRED@
BuildRequires: pkgconfig(gtk-vnc-2.0) >= @GTK_VNC_REQUIRED@
2011-02-11 18:55:49 +03:00
%if %{with_spice}
BuildRequires: pkgconfig(spice-client-gtk-3.0) >= @SPICE_GTK_REQUIRED@
BuildRequires: pkgconfig(spice-protocol) >= @SPICE_PROTOCOL_REQUIRED@
2011-07-12 16:10:40 +04:00
%endif
2007-07-20 23:59:19 +04:00
BuildRequires: /usr/bin/pod2man
BuildRequires: gettext
2013-05-01 20:40:06 +04:00
%if %{with_govirt}
BuildRequires: pkgconfig(govirt-1.0) >= @GOVIRT_REQUIRED@
2013-05-01 20:40:06 +04:00
%endif
%if %{with_bash_completion}
BuildRequires: pkgconfig(bash-completion) >= @BASH_COMPLETION_REQUIRED@
%endif
2007-07-20 23:26:08 +04:00
%if 0%{?fedora} >= 20
Obsoletes: spice-client < 0.12.3-2
%endif
2007-07-20 23:26:08 +04:00
%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.
2007-07-20 23:26:08 +04:00
%prep
%setup -q
%build
2011-02-11 18:55:49 +03:00
%if 0%{?enable_autotools}
autoreconf -if
%endif
2011-02-11 18:55:49 +03:00
%if %{with_spice}
2011-11-04 00:37:48 +04:00
%define spice_arg --with-spice-gtk
2011-02-11 18:55:49 +03:00
%else
2011-11-04 00:37:48 +04:00
%define spice_arg --without-spice-gtk
2011-02-11 18:55:49 +03:00
%endif
%if %{with_govirt}
%define govirt_arg --with-ovirt
%endif
%configure %{spice_arg} %{govirt_arg} --with-buildid=%{release} --disable-update-mimedb
%__make %{?_smp_mflags}
2007-07-20 23:26:08 +04:00
%install
rm -rf $RPM_BUILD_ROOT
%__make install DESTDIR=$RPM_BUILD_ROOT
%find_lang %{name}
2007-07-20 23:26:08 +04:00
%files -f %{name}.lang
%doc README.md COPYING AUTHORS ChangeLog NEWS
2007-07-20 23:26:08 +04:00
%{_bindir}/%{name}
%{_bindir}/remote-viewer
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/icons/hicolor/*/devices/*
%{_datadir}/applications/remote-viewer.desktop
%{_datadir}/appdata/remote-viewer.appdata.xml
2013-02-12 21:59:04 +04:00
%{_datadir}/mime/packages/virt-viewer-mime.xml
2012-02-06 18:04:45 +04:00
%{_mandir}/man1/virt-viewer.1*
%{_mandir}/man1/remote-viewer.1*
%if %{with_bash_completion}
%{_datadir}/bash-completion/completions/virt-viewer
%endif
2007-07-20 23:26:08 +04:00
%changelog