File vinagre.spec of Package vinagre
#
# spec file for package vinagre
#
# Copyright (c) 2011 SUSE LINUX Products 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 http://bugs.opensuse.org/
#
# norootforbuild
Name: vinagre
Summary: VNC client for GNOME
Version: 3.2.1
Release: 1
# FIXME: when patch0 is dropped, remove the first make that is needed to generate a header; it'll get fixed properly upstream because the missing file will be in the tarball
# FIXME: Check if bgo#653558 has been fixed. Once fixed, remove the -Wl,--no-as-needed hack in the build section and verify if the plugins work.
License: GPLv2+
Group: Productivity/Networking/Other
Url: http://www.gnome.org/projects/vinagre/
Source0: http://download.gnome.org/sources/vinagre/3.2/%{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM vinagre-fix-missing-header.patch bgo#652531 vuntz@opensuse.org -- Fix build because of vala not generating a header; based on https://gitorious.org/vinagre/vinagre-elmarco/commit/0d7727a501e2d9fcf911b9a96fda384e53878af5
Patch0: vinagre-fix-missing-header.patch
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: gdbm-devel
BuildRequires: gnome-doc-utils-devel
BuildRequires: gnome-icon-theme
BuildRequires: intltool
# We need the %%mime_database_* macros
BuildRequires: shared-mime-info
BuildRequires: translation-update-upstream
BuildRequires: update-desktop-files
BuildRequires: vala
BuildRequires: pkgconfig(avahi-gobject)
BuildRequires: pkgconfig(avahi-ui-gtk3)
BuildRequires: pkgconfig(gnome-keyring-1)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(gtk-vnc-2.0)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(telepathy-glib)
BuildRequires: pkgconfig(vte-2.90)
Requires: gnome-icon-theme
Recommends: %{name}-lang
# For rdp support
Recommends: rdesktop
Obsoletes: %{name}-devel < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires
%description
Vinagre is a VNC client for GNOME that supports connecting to multiple
machines, browsing for VNC servers via avahi and password storage in
gnome-keyring.
%lang_package
%prep
%setup -q
translation-update-upstream
%patch0 -p1
%build
# Workaround bgo#653558: The plugins are not dynamically loaded at runtime but are
# linked to the binary at build time. With -Wl,as-needed though the references are
# being dropped as there is no direct call to them.
export CFLAGS="%{optflags} -Wl,--no-as-needed"
%configure --disable-static \
--disable-scrollkeeper \
--enable-ssh \
--disable-spice
# patch0 needs some help
make vinagre/vinagre-utils.c
make V=1 %{?_smp_mflags}
%install
%makeinstall
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
find %{buildroot} -type f -name "*.la" -delete -print
%suse_update_desktop_file -G "Remote Desktop Viewer" vinagre
%suse_update_desktop_file vinagre-file
%find_lang %{name} %{?no_lang_C}
for size in 8x8 16x16 22x22 24x24 32x32 48x48 256x256; do
if test -f %{_datadir}/icons/gnome/$size/apps/preferences-desktop-remote-desktop.png; then
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/$size/apps
cp -a %{_datadir}/icons/gnome/$size/apps/preferences-desktop-remote-desktop.png %{buildroot}%{_datadir}/icons/hicolor/$size/apps/preferences-desktop-remote-desktop.png
fi
done
%fdupes $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%post
%glib2_gsettings_schema_post
%desktop_database_post
%icon_theme_cache_post
%mime_database_post
%postun
%glib2_gsettings_schema_postun
%desktop_database_postun
%icon_theme_cache_postun
%mime_database_postun
%files
%defattr(-, root, root)
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/%{name}/
%doc %{_datadir}/gnome/help/%{name}/C/
%{_bindir}/vinagre
%{_datadir}/applications/vinagre.desktop
%{_datadir}/applications/vinagre-file.desktop
%{_datadir}/dbus-1/services/org.freedesktop.Telepathy.Client.Vinagre.service
%dir %{_datadir}/GConf
%dir %{_datadir}/GConf/gsettings
%{_datadir}/GConf/gsettings/org.gnome.Vinagre.convert
%{_datadir}/glib-2.0/schemas/org.gnome.Vinagre.gschema.xml
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/mime/packages/vinagre-mime.xml
%{_datadir}/telepathy/clients/Vinagre.client
%dir %{_datadir}/vinagre
%{_datadir}/vinagre/vinagre*
%{_libdir}/vinagre-3.0/
%{_mandir}/man1/*.1.gz
# Own directories that are not owned by anything else
%dir %{_datadir}/telepathy
%dir %{_datadir}/telepathy/clients
%files lang -f %{name}.lang
%changelog