File gobby.spec of Package gobby

# spec file for package gobby
# 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

# norootforbuild

Name:           gobby
%define _versioned_name gobby-0.5
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  intltool
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(glibmm-2.4)
%if 0%{?favor_gtk2}
BuildRequires:  pkgconfig(gtkmm-2.4)
BuildRequires:  pkgconfig(gtksourceview-2.0)
BuildRequires:  pkgconfig(gtkmm-3.0)
BuildRequires:  pkgconfig(gtksourceview-3.0)
BuildRequires:  pkgconfig(libgsasl)
BuildRequires:  pkgconfig(libinfinity-0.5)
BuildRequires:  pkgconfig(libxml++-2.6)
BuildRequires:  pkgconfig(unique-1.0)
# For directory ownership:
BuildRequires:  gnome-themes
License:        GPLv2 ; GPLv2+
Group:          Productivity/Editors/Other
Version:        0.4.94
Release:        2
Summary:        Gobby collaborative editor (Infinote protocol)
Source:         %{name}-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires(post): update-alternatives
Requires(postun): update-alternatives
# The build service fails to build the package because it doesn't really
# understand Requires(post), so use PreReq too (see bnc#439232).
%if %defined suse_version
PreReq:         update-alternatives
Recommends:     %{name}-lang

Gobby is a free collaborative editor. This means that it provides you
with the possibility to edit files simultaneously with other users over
a network. It supports multiple documents in one session.
The platforms on which you could use Gobby are so far Microsoft Windows,
Linux, Mac OS X and other Unix-like ones.

This is the latest version of Gobby, which is using the Infinote protocol.

%setup -q

%configure \
    --disable-scrollkeeper \
    --with-gnome \
%if 0%{?favor_gtk2}
%{__make} %{?jobs:-j%jobs}

%find_lang gobby05 %{?no_lang_C}
# For documentation. It's not versioned, but gobby 0.4 doesn't have such files,
# so there's no conflict.
%find_lang gobby %{?no_lang_C} gobby05.lang
%suse_update_desktop_file -N "Gobby" -G "Collaborative Editor" %{_versioned_name} X-SuSE-Core-Internet
%fdupes %{buildroot}

rm -rf %{buildroot}

# If the %{name} group is in automatic mode, then this will also switch all
# symlinks automatically
update-alternatives --install %{_bindir}/%{name} %{name} %{_bindir}/%{name}-0.5 5 --slave %{_mandir}/man1/%{name}.1.gz %{name}.1.gz %{_mandir}/man1/%{name}-0.5.1.gz
%if 0%{?suse_version} > 1130
%icon_theme_cache_post HighContrastLargePrint
%icon_theme_cache_post HighContrastLargePrintInverse

# Note: we don't use "$1 -eq 0", to avoid issues if the package gets renamed
if [ ! -f %{_bindir}/%{name}-0.5 ]; then
  update-alternatives --remove %{name} %{_bindir}/%{name}-0.5
%if 0%{?suse_version} > 1130
%icon_theme_cache_postun HighContrastLargePrint
%icon_theme_cache_postun HighContrastLargePrintInverse

# Workaround old bug in 11.1/11.2 packages that always removed the symlinks in
# %postun. Can be removed during 12.2 development.
if [ ! -f %{_bindir}/%{name} -a -f %{_bindir}/%{name}-0.5 ]; then
  update-alternatives --install %{_bindir}/%{name} %{name} %{_bindir}/%{name}-0.5 5 --slave %{_mandir}/man1/%{name}.1.gz %{name}.1.gz %{_mandir}/man1/%{name}-0.5.1.gz

%defattr (-, root, root)
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/%{name}/
%doc %{_datadir}/gnome/help/%{name}/C/
%dir %{_datadir}/omf/
%dir %{_datadir}/omf/%{name}/
%doc %{_datadir}/omf/%{name}/%{name}-C.omf
%doc %{_mandir}/man1/*.*
# FIXME: gnome-themes does not provide excluded directories yet.
%exclude %{_datadir}/icons/HighContrast*/scalable/*

%files lang -f gobby05.lang

openSUSE Build Service is sponsored by