File yelp.spec of Package yelp.import4533

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


# Starting with openSUSE 11.3 we use tracker instead of beagle
%define no_beagle 0%{suse_version} >= 1130

%if %suse_version >= 1140
%define xulrunner_version 20
%endif
%if %suse_version == 1130
%define xulrunner_version 192
%endif
%if %suse_version == 1120
%define xulrunner_version 191
%endif
%if 0%{?xulrunner_version} == 0
%define xulrunner_version NOTSUPPORTED
%endif

Name:           yelp
BuildRequires:  dbus-1-glib-devel
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gconf2-devel
BuildRequires:  gnome-common
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  gtk2-devel
BuildRequires:  intltool
%if !%no_beagle
BuildRequires:  libbeagle-devel
%endif
BuildRequires:  libxslt-devel
BuildRequires:  mozilla-xulrunner%{xulrunner_version}-devel
BuildRequires:  rarian-devel
BuildRequires:  startup-notification-devel
BuildRequires:  susehelp
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
License:        GPLv2+ ; LGPLv2.1+
Group:          System/GUI/GNOME
Version:        2.30.2
Release:        9.<RELEASE14>
Summary:        Help Browser for the GNOME Desktop
Source:         ftp://ftp.gnome.org/pub/GNOME/sources/yelp/2.12/%{name}-%{version}.tar.bz2
Url:            http://www.gnome.org
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# PATCH-FIX-UPSTREAM yelp-fix-URI-handler.patch bgo#631678 badshah400@gmail.com -- Register scheme-related mimetypes with yelp
Patch0:         yelp-fix-URI-handler.patch
# PATCH-FIX-OPENSUSE yelp-no-xulrunner20.patch vuntz@opensuse.org -- Do not try to use xulrunner 2.0, as it's not working.
Patch1:         yelp-no-xulrunner20.patch
# PATCH-FIX-OPENSUSE yelp-xulrunner20.patch vuntz@opensuse.org -- Port to xulrunner 2.0. Note that upstream moved to webkit, so there's no point in sending the patch upstream.
Patch2:         yelp-xulrunner20.patch
# PATCH-FEATURE-OPENSUSE yelp-2.13.5-use-susehelp.patch -- make gnome-help a symlink to susehelp for better cross-desktop compatibility
Patch6:         yelp-2.13.5-use-susehelp.patch
# PATCH-FEATURE-OPENSUSE yelp-handle-help-uri.patch vuntz@novell.com -- handle help: URI
Patch9:         yelp-handle-help-uri.patch
# PATCH-FIX-UPSTREAM yelp-missing-slash.patch dimstar@opensuse.org - Use g_build_filename to avoid missing slash problem, taken from git.
Patch10:        yelp-missing-slash.patch
# PATCH-FIX-UPSTREAM yelp-fix-crash-on-print.patch bgo#642808 vuntz@opensuse.org -- Fix crash when printing a whole document: we were freeing memory we shouldn't.
Patch11:        yelp-fix-crash-on-print.patch
# PATCH-FIX-UPSTREAM yelp-fix-html-print.patch bgo#642811 vuntz@opensuse.org -- Fix crash when printing a pure HTML document
Patch12:        yelp-fix-html-print.patch
# PATCH-FIX-UPSTREAM yelp-no-freeze-on-window-move.patch bgo#642813 vuntz@opensuse.org -- Fix freeze when yelp window is moved. Similar to ce9025fffd63568305313cd7fddbd17fd8e058f5 upstream for the new yelp
Patch13:        yelp-no-freeze-on-window-move.patch
Provides:       suse_help_viewer
# We need the stylesheets from gnome-doc-utils
Requires:       gnome-doc-utils
Requires:       mozilla-xulrunner%{xulrunner_version}
Requires:       susehelp
Recommends:     %{name}-lang
%gconf_schemas_prereq

%description
Yelp is the default help browser for the GNOME desktop. Yelp provides a
simple graphical interface for viewing DocBook, HTML, man, and info
formatted documentation.

%lang_package
%prep
%setup -q
translation-update-upstream
%patch0 -p1
%if %xulrunner_version != 20
%patch1 -p1
%else
%patch2 -p1
%endif
%patch6 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1

%build
%if %xulrunner_version == 20
autoreconf -fi
%endif
%configure
make %{?jobs:-j%jobs}

%install
%makeinstall
%if 0%{?suse_version} <= 1110
%{__rm} %{buildroot}%{_datadir}/locale/la/LC_MESSAGES/*
%endif
%if 0%{?suse_version} <= 1120
%{__rm} %{buildroot}%{_datadir}/locale/en@shaw/LC_MESSAGES/*
%endif
%suse_update_desktop_file %name
%find_lang %{name} %{?no_lang_C}
%find_gconf_schemas
cat %{name}.schemas_list >%{name}.lst
%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%pre -f %{name}.schemas_pre

%posttrans -f %{name}.schemas_posttrans

%preun -f %{name}.schemas_preun

%post
%desktop_database_post
%icon_theme_cache_post

%postun
%desktop_database_postun
%icon_theme_cache_postun

%files -f %{name}.lst
%defattr (-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_bindir}/*
%{_datadir}/applications/yelp.desktop
%{_datadir}/icons/hicolor/192x192/apps/yelp-icon-big.png
%{_datadir}/yelp

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by