Codebase list virt-viewer / debian/5.0-1 virt-viewer.spec.in
debian/5.0-1

Tree @debian/5.0-1 (Download .tar.gz)

virt-viewer.spec.in @debian/5.0-1

e4be188
 
5bf850a
 
 
0d29721
5bf850a
07b9d4d
0d29721
07b9d4d
 
 
01d4881
0d29721
 
e7ae231
 
e4be188
 
 
 
 
dbff602
e4be188
 
 
dbff602
e2a8e17
 
7ef218a
 
e4be188
5bf850a
 
 
 
 
 
 
f00b1ca
 
 
 
 
 
07b9d4d
f00b1ca
 
07b9d4d
e4be188
07b9d4d
0d29721
f00b1ca
0d29721
 
 
 
 
 
e4be188
 
 
8d9bbb8
 
e4be188
 
 
 
 
07b9d4d
5bf850a
 
 
07b9d4d
 
032178c
07b9d4d
032178c
07b9d4d
 
01d4881
 
 
 
de8f760
dbff602
e4be188
 
 
 
dbff602
e2a8e17
 
 
6806613
e4be188
 
 
 
e2a8e17
 
6cb2e48
e2a8e17
7ef218a
6cb2e48
e2a8e17
 
 
 
 
6cb2e48
e2a8e17
 
6cb2e48
e2a8e17
 
 
6cb2e48
e2a8e17
6806613
e4be188
 
 
e2a8e17
 
de8f760
7ef218a
f00b1ca
5bf850a
e2a8e17
 
 
 
e4be188
 
# -*- 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:%define enable_autotools 0}

%define with_spice 0
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 6
%define with_spice 1
%endif

%define with_govirt 0
%if 0%{?fedora} > 19 || 0%{?rhel} >= 7
%define with_govirt 1
%endif

Name: @PACKAGE@
Version: @VERSION@
Release: 1%{?dist}%{?extra_release}
Summary: Virtual Machine Viewer
Group: Applications/System
License: GPLv2+
URL: http://virt-manager.org/
Source0: http://virt-manager.org/download/sources/%{name}/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: openssh-clients
Requires(post):   %{_sbindir}/update-alternatives
Requires(postun): %{_sbindir}/update-alternatives
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils

%if 0%{?enable_autotools}
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gettext-devel
BuildRequires: libtool
%endif

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@
%if %{with_spice}
BuildRequires: pkgconfig(spice-client-gtk-3.0) >= @SPICE_GTK_REQUIRED@
BuildRequires: pkgconfig(spice-protocol) >= @SPICE_PROTOCOL_REQUIRED@
%endif
BuildRequires: /usr/bin/pod2man
BuildRequires: intltool
%if %{with_govirt}
BuildRequires: pkgconfig(govirt-1.0) >= @GOVIRT_REQUIRED@
%endif

%if 0%{?fedora} >= 20
Obsoletes: spice-client < 0.12.3-2
%endif


%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
%setup -q

%build

%if 0%{?enable_autotools}
autoreconf -if
%endif

%if %{with_spice}
%define spice_arg --with-spice-gtk
%else
%define spice_arg --without-spice-gtk
%endif

%if %{with_govirt}
%define govirt_arg --with-ovirt
%endif

%configure %{spice_arg} %{gtk_arg} %{govirt_arg} --with-buildid=%{release} --disable-update-mimedb
%__make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
%__make install  DESTDIR=$RPM_BUILD_ROOT
mkdir -p %{buildroot}%{_libexecdir}
touch %{buildroot}%{_libexecdir}/spice-xpi-client
install -m 0755 data/spice-xpi-client-remote-viewer %{buildroot}%{_libexecdir}/
%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
/bin/touch --no-create %{_datadir}/mime/packages &> /dev/null || :
%{_sbindir}/update-alternatives --install %{_libexecdir}/spice-xpi-client \
  spice-xpi-client %{_libexecdir}/spice-xpi-client-remote-viewer 25
/usr/bin/update-desktop-database -q %{_datadir}/applications

%postun
if [ $1 -eq 0 ] ; then
  /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
  /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
  /usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
  %{_sbindir}/update-alternatives --remove spice-xpi-client %{_libexecdir}/spice-xpi-client-remote-viewer
fi
/usr/bin/update-desktop-database -q %{_datadir}/applications

%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
/usr/bin/update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc README COPYING AUTHORS ChangeLog NEWS
%{_bindir}/%{name}
%{_bindir}/remote-viewer
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/icons/hicolor/*/devices/*
%{_datadir}/applications/remote-viewer.desktop
%{_datadir}/appdata/remote-viewer.appdata.xml
%{_datadir}/mime/packages/virt-viewer-mime.xml
%ghost %{_libexecdir}/spice-xpi-client
%{_libexecdir}/spice-xpi-client-remote-viewer
%{_mandir}/man1/virt-viewer.1*
%{_mandir}/man1/remote-viewer.1*

%changelog