File yelp.spec of Package yelp

#
# 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/
#



Name:           yelp
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gnome-common
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  intltool
BuildRequires:  susehelp
BuildRequires:  translation-update-upstream
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(liblzma)
BuildRequires:  pkgconfig(libxslt)
BuildRequires:  pkgconfig(sqlite3)
BuildRequires:  pkgconfig(webkitgtk-3.0)
BuildRequires:  pkgconfig(yelp-xsl)
BuildRequires:  update-desktop-files
License:        GPLv2+ ; LGPLv2.1+
Group:          System/GUI/GNOME
Version:        3.2.1
Release:        1
Summary:        Help Browser for the GNOME Desktop
Source:         http://download.gnome.org/sources/yelp/3.2/%{name}-%{version}.tar.bz2
Url:            http://www.gnome.org
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# PATCH-FEATURE-OPENSUSE yelp-2.13.5-use-susehelp.patch -- make gnome-help a symlink to susehelp for better cross-desktop compatibility
Patch0:         yelp-2.13.5-use-susehelp.patch
# PATCH-FEATURE-OPENSUSE yelp-lang-bundle.patch bnc#689979 vuntz@opensuse.org -- Support help documents shipped in bundles
Patch1:         yelp-lang-bundle.patch
Provides:       suse_help_viewer
Requires:       susehelp
# We need the stylesheets from yelp-xsl
Requires:       yelp-xsl
Recommends:     %{name}-lang
%glib2_gsettings_schema_requires

%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.

%package -n libyelp0
License:        GPLv2+ ; LGPLv2.1+
Summary:        Help Browser for the GNOME Desktop -- Library
Group:          System/Libraries

%description  -n libyelp0
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.

%package devel
License:        GPLv2+ ; LGPLv2.1+
Summary:        Help Browser for the GNOME Desktop -- Development Files
Group:          Development/Libraries/GNOME
Requires:       libyelp0 = %{version}

%description devel
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
%patch1 -p1

%build
# needed by patch0
autoreconf
%configure --disable-static
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
find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
%suse_update_desktop_file %name
%find_lang %{name} %{?no_lang_C}
%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%post
%desktop_database_post
%icon_theme_cache_post
%glib2_gsettings_schema_post

%postun
%desktop_database_postun
%icon_theme_cache_postun
%glib2_gsettings_schema_postun

%post -n libyelp0 -p /sbin/ldconfig

%postun -n libyelp0 -p /sbin/ldconfig

%files
%defattr (-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_bindir}/*
%{_datadir}/applications/yelp.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.yelp.gschema.xml
%{_datadir}/yelp/

%files -n libyelp0
%defattr (-, root, root)
%{_libdir}/*.so.0*

%files lang -f %{name}.lang

%files devel
%defattr (-, root, root)
%{_datadir}/gtk-doc/html/libyelp/
%{_includedir}/libyelp/
%{_libdir}/*.so

%changelog
openSUSE Build Service is sponsored by