File release-notes-openSUSE.spec of Package release-notes-openSUSE.7723

#
# spec file for package release-notes-openSUSE
#
# 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/
#


Name:           release-notes-openSUSE
Version:        42.2.20180124
Release:        0
Summary:        Release Notes for openSUSE
License:        GFDL-1.3
Group:          Documentation/SUSE
Url:            https://github.com/openSUSE/release-notes-openSUSE
BuildRequires:  daps
BuildRequires:  docbook_5
BuildRequires:  gettext-tools
BuildRequires:  recode
BuildRequires:  suse-xsl-stylesheets
BuildRequires:  update-desktop-files
BuildRequires:  w3m
BuildRequires:  xml2po
BuildRequires:  xmlcharent
Requires:       dejavu-fonts
Requires:       google-opensans-fonts
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       release-notes = %{version}
Source:         %{name}-%{version}.tar.bz2
Source1:        %{name}.desktop

%description
This package contains the release notes with the most important changes
for this openSUSE release. In HTML format, they are available in the
help center.

openSUSE Leap 42.2 is now at the end of its maintainance cycle.

%prep
%setup -q

%build
%define SUSE_PROD openSUSE
make linguas
make all LIFECYCLE=unmaintained VERSION='%{version}'

%install
rnpath=%{buildroot}%{_datadir}/doc/release-notes/%{SUSE_PROD}
%{__install} -m 0644 -D LICENSE ${rnpath}/LICENSE
%{__install} -m 0644 -D "%{_sourcedir}/%{name}.desktop" "%{buildroot}%{_datadir}/susehelp/meta/%{name}.desktop"
for file in build/release-notes.*; do
	lang=$(echo "$file" | awk -F '.' '{print $2}')
	echo "DocPath[${lang}]={_datadir}/doc/release-notes/%{SUSE_PROD}/RELEASE-NOTES.${lang}.html" > "%{buildroot}%{_datadir}/susehelp/meta/%{name}.desktop"
	%{__install} -m 0644 -D "${file}/single-html/release-notes.${lang}/release-notes.${lang}.html" "${rnpath}/RELEASE-NOTES.${lang}.html"
	%{__cp} -R "${file}/single-html/release-notes.${lang}/static/" "${rnpath}"
	%{__install} -m 0644 -D "${file}/yast-html/release-notes.${lang}.html" "${rnpath}/RELEASE-NOTES.${lang}.rtf"
	%{__install} -m 0644 -D "${file}/release-notes.${lang}_color_$lang.pdf" "${rnpath}/RELEASE-NOTES.${lang}.pdf"
	%{__install} -m 0644 -D "${file}/release-notes.${lang}.txt" "${rnpath}/RELEASE-NOTES.${lang}.txt"
done
%suse_update_desktop_file %{buildroot}%{_datadir}/susehelp/meta/%{name}.desktop

%files
%defattr(-,root,root)
%doc %{_datadir}/doc/release-notes/
%dir %{_datadir}/susehelp/
%dir %{_datadir}/susehelp/meta/
%{_datadir}/susehelp/meta/%{name}.desktop

%changelog
openSUSE Build Service is sponsored by