File gnome-user-docs.spec of Package gnome-user-docs
#
# spec file for package gnome-user-docs
#
# 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: gnome-user-docs
Version: 3.2.1
Release: 1
# FIXME: parallel build is disabled because it's actually much slower (see bgo#659421); should be safe to reenable in 3.3.x
# FIXME: the %%{_datadir}/help/$locale/ files should be found by %%find_lang
License: GFDL 1.1
Summary: GNOME Desktop Documentation
Url: http://www.gnome.org
Group: Documentation/Other
Source: http://download.gnome.org/sources/gnome-user-docs/3.2/%{name}-%{version}.tar.bz2
BuildRequires: fdupes
BuildRequires: itstool
Recommends: %{name}-lang
Supplements: gnome-session
# Old name, for openSUSE <= 11.2
Provides: gnome2-user-docs = %{version}
Obsoletes: gnome2-user-docs < %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
This package contains documents that are targeted for GNOME end-users.
%lang_package
%prep
%setup -q
%build
%configure
make
%install
%makeinstall
# Disable find_lang until it supports the xdg help system
#%%find_lang gnome-help %{?no_lang_C}
# Localized help
for help in %{buildroot}%{_datadir}/help/*/gnome-help/; do
LOCALE=`echo $help | sed "s:.*%{_datadir}/help/\([^/]*\)/gnome-help/:\1:g"`
echo "%%lang($LOCALE) %%dir %%{_datadir}/help/$LOCALE" >> %{name}.help-lang.tmp
echo "%%lang($LOCALE) %%doc /${help##%{buildroot}}" >> %{name}.help-lang.tmp
done
echo "%%defattr(-,root,root)" > %{name}.help-lang
sort -u %{name}.help-lang.tmp | grep -v "^%%lang(C)" >> %{name}.help-lang
rm %{name}.help-lang.tmp
%fdupes %{buildroot}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc COPYING NEWS
%if 0%{?suse_version} <= 1140
%doc %dir %{_datadir}/help
%doc %dir %{_datadir}/help/C
%endif
%doc %{_datadir}/help/C/gnome-help/
%files lang -f %{name}.help-lang
%changelog