File release-notes-sle_hpc.spec of Package release-notes-sle_hpc

#
# spec file for package release-notes-sle_hpc
#
# Copyright (c) 2022 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


%define GITNAME release-notes-hpc
# "lifecycle" changes the document profiling, accepted values:
#   beta | maintained | unmaintained
%define lifecycle maintained
Name:           release-notes-sle_hpc
# sorry for the insane version number but we blundered with
# the 15 GA package, and now the version needs to be greater
# than 15.YYYYMMDD
Version:        15.400000000.20221130
Release:        0
Summary:        Release Notes for SLE HPC
License:        CC-BY-ND-4.0
Group:          Documentation/SUSE
URL:            https://www.suse.com/releasenotes/
Source:         %{GITNAME}-%{version}.tar.bz2
BuildRequires:  daps
BuildRequires:  suse-xsl-stylesheets >= 1.9.18
BuildRequires:  update-desktop-files
BuildRequires:  w3m
Requires:       dejavu-fonts
Requires:       google-opensans-fonts
Supplements:    SLE_HPC-release
Provides:       release-notes() = SLE_HPC
BuildArch:      noarch

%description
This package contains the release notes for SUSE Linux Enterprise
High Performance Computing.
After installing this package, the release notes files can be
found in the %{_datadir}/doc/release-notes directory. The release notes
are available in the following output formats: PDF, HTML, and TXT.

%prep
%setup -q -n %{GITNAME}-%{version}

%build
%define SUSE_PROD SLE_HPC_15
sed -i 's/@VERSION@/%{version}/' adoc/release-notes-docinfo.xml adoc/attributes-generic.adoc
make all LIFECYCLE=%{lifecycle}

%install
rnpath=%{buildroot}%{_datadir}/doc/release-notes/%{SUSE_PROD}
install -m 0644 -D LICENSE ${rnpath}/LICENSE
install -m 0644 -D "build/release-notes/html/release-notes/index.html" "${rnpath}/RELEASE-NOTES.en.html"
install -m 0644 -D build/release-notes/html/release-notes/*.html "${rnpath}"
cp -R "build/release-notes/single-html/release-notes/static/" "${rnpath}"
install -m 0644 -D "build/release-notes/yast-html/release-notes.html" "${rnpath}/RELEASE-NOTES.en.rtf"
install -m 0644 -D "build/release-notes/release-notes_color_en.pdf" "${rnpath}/RELEASE-NOTES.en.pdf"
install -m 0644 -D "build/release-notes/release-notes.txt" "${rnpath}/RELEASE-NOTES.en.txt"

%files
%doc %{_datadir}/doc/release-notes/

%changelog
openSUSE Build Service is sponsored by