File release-notes-susemanager.spec of Package release-notes-susemanager.28519

#
# spec file for package release-notes-susemanager
#
# Copyright (c) 2023 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/
#


URL:            https://www.suse.com/products/suse-manager

Name:           release-notes-susemanager
Summary:        Release Notes for SUSE Manager Server
License:        CC-BY-ND-4.0
Group:          Documentation/SUSE
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       release-notes() = SUSE-Manager-Server
Supplements:    SUSE-Manager-Server-release
Version:        4.2.12
Release:        0
Source:         %{name}.tar.bz2
Source1:        package-with-huge-docs.rpmlintrc
Source2:        obsolete-not-provided.rpmlintrc
BuildRequires:  w3m
BuildRequires:  fdupes

# bsc#1137329
Obsoletes:      release-notes-susemanager-proxy < 4.1.100

BuildArch:      noarch

%description
This package contains files with the most important changes for this
SUSE Manager release. They can be found in the
%{_datadir}/doc/release-notes directory.

%prep
%setup -n %{name}

%build
w3m -dump doc/release-notes-susemanager-server.html > RELEASE-NOTES.en.txt

%install
rnpath=%{buildroot}%{_datadir}/doc/release-notes/SUSE_Manager_Server
rnpath_html=%{buildroot}/srv/www/htdocs/docs/en/release-notes/
mkdir -p "$rnpath"
mkdir -p "$rnpath_html"

# rtf used by yast GUI
cp doc/release-notes-susemanager-server.html "$rnpath"/RELEASE-NOTES.en.rtf
# txt used by yast ncurses
cp RELEASE-NOTES.en.txt "$rnpath"/RELEASE-NOTES.en.txt
# html used by SUSE Manager
cp doc/release-notes-susemanager-server.html "$rnpath"/RELEASE-NOTES.en.html
cp doc/release-notes-susemanager-server.html "$rnpath_html"/release-notes-server.html
cp doc/release-notes-susemanager-proxy.html  "$rnpath_html"/release-notes-proxy.html
cp doc/dots-gray.png "$rnpath_html"/dots-gray.png

%fdupes $rnpath
%fdupes $rnpath_html

%files
%defattr (-,root,root,-)
%doc %{_datadir}/doc/release-notes
%dir /srv/www/htdocs/docs
%dir /srv/www/htdocs/docs/en
/srv/www/htdocs/docs/en/release-notes

%changelog
openSUSE Build Service is sponsored by