File sle-rt-shielding_en.spec of Package sle-rt-shielding_en.16670

# spec file for package sle-rt-shielding_en
#
# Copyright (c) 2018 SUSE Linux 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/
# Automatically generated from origin	git@github.com:SUSE/doc-slert (fetch) : * develop


%bcond_without PDF
Name:           sle-rt-shielding_en
%define my_lang en
%define my_book SLE-RT-shielding
Version:        15.2
Release:        1
#BREQ
Provides:       locale(desktop-data-openSUSE:en)
#OBS
Source:         book-slert-shielding_en_src_set.tar.bz2
#SOURCES
Source901:      doc_pre_checkin.sh
Source903:      attributes
BuildRequires:  daps > 1.99999
BuildRequires:  docbook5-xsl-stylesheets
BuildRequires:  fdupes
BuildRequires:  jing
BuildRequires:  suse-xsl-stylesheets > 1.99999
BuildRequires:  update-desktop-files
#JSP_REQ
Requires:       dejavu-fonts
Requires:       google-opensans-fonts
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
Summary:        SLE RT Shielding Howto (English)
License:        GFDL-1.2
Group:          Documentation/SUSE
Url:            http://doc.opensuse.org
%define _defaultdocdir %{_datadir}/doc/manual
%define _docdir %{_datadir}/doc/manual


%description
The SLE RT Shielding Howto (English).

%prep
%setup -q -c -n %{name}-%{version}/%{my_book}
find -name '*.png' -o -name '*.svg' -exec chmod 644 {} \; || :


%build
%define my_all_dir  %{_builddir}/%{name}-%{version}/%{my_book}
export ADDITIONAL_OPTIONS="-Xss3072K"
package_dir=$(daps -d DC-%{my_book} package-html --pagefiles)

# daps now obeys ll_CC captalization convention
tar xvf $package_dir/*_%{my_lang}-html.tar.bz2
cp $package_dir/*.page %{name}.page

%if %{with PDF}
daps -d DC-%{my_book} pdf
%endif


%install
mkdir -p %{buildroot}%{_defaultdocdir}
# product is name without language code
%define gnome_dir %{_datadir}/gnome/help/sle-rt-shielding
install -d %{buildroot}%{gnome_dir}

# Install the HTML
cp -a --dereference book-slert-shielding %{buildroot}/%{_defaultdocdir}/%{name}

# Install the GNOME files:
gnome_help_dir=%{_datadir}/help/C/gnome-help
mkdir -p %{buildroot}$gnome_help_dir
cp %{name}.page %{buildroot}$gnome_help_dir/%{name}.page

# Create the link to make the book visible in yelp
if [ %{my_lang} = "en" ]; then
  pushd %{buildroot}%{_datadir}/help/C
  ln -s ../../doc/manual/%{name} %{my_book}
  popd
fi

# Install the PDF
%if %{with PDF}
install -d %{buildroot}%{_defaultdocdir}/%{name}-pdf
cp -v build/%{my_book}/*.pdf  %{buildroot}%{_defaultdocdir}/%{name}-pdf/%{name}.pdf
%endif

%fdupes '%{buildroot}%{_docdir}'


%files
%dir %{_defaultdocdir}
%dir %{_defaultdocdir}/%{name}
%{_defaultdocdir}/%{name}/*
%if %{with PDF}
%dir %{_defaultdocdir}/%{name}-pdf
%{_defaultdocdir}/%{name}-pdf/*
%endif

#GNOME
%{_datadir}/help/C/%{my_book}
%dir %{_datadir}/help/C/gnome-help
%{_datadir}/help/C/gnome-help/*

%changelog
openSUSE Build Service is sponsored by