File release-notes-uyuni.spec of Package release-notes-uyuni
#
# spec file for package release-notes-uyuni
#
# Copyright (c) 2025 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/
#
%global debug_package %{nil}
%global susemanager_shared_path /usr/share/susemanager
%global wwwroot %{susemanager_shared_path}/www
%define www_path %{wwwroot}/htdocs
URL: https://www.uyuni-project.org
Name: release-notes-uyuni
Summary: Release Notes for Uyuni Server
License: CC-BY-SA-3.0
Group: Documentation/SUSE
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: release-notes = %{version}
Provides: release-notes-susemanager
Obsoletes: release-notes < %{version}
Version: 2025.07
Release: 0
Source: %{name}.tar.bz2
Source1: package-with-huge-docs.rpmlintrc
BuildRequires: fdupes
BuildRequires: w3m
BuildArch: noarch
%description
This package contains files with the most important changes for this
Uyuni release. They can be found in the
%{_datadir}/doc/release-notes directory.
%prep
%setup -n %{name}
%build
w3m -dump doc/release-notes-uyuni-server.html > RELEASE-NOTES.en.txt
%install
rnpath="${RPM_BUILD_ROOT}"%{_datadir}/doc/release-notes/Uyuni_Server
rnpath_html="${RPM_BUILD_ROOT}"%{www_path}/docs/en/release-notes/
mkdir -p "$rnpath"
mkdir -p "$rnpath_html"
# rtf used by yast GUI
cp doc/release-notes-uyuni-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 Uyuni
cp doc/release-notes-uyuni-server.html "$rnpath"/RELEASE-NOTES.en.html
cp doc/release-notes-uyuni-server.html "$rnpath_html"/release-notes-server.html
cp doc/release-notes-uyuni-proxy.html "$rnpath_html"/release-notes-proxy.html
cp doc/hub-architecture.png "$rnpath_html"/hub-architecture.png
%fdupes $rnpath
%fdupes $rnpath_html
%files
%defattr (-,root,root,-)
%doc %{_datadir}/doc/release-notes
%dir %{susemanager_shared_path}
%dir %{wwwroot}
%dir %{www_path}
%dir %{www_path}/docs
%dir %{www_path}/docs/en
%{www_path}/docs/en/release-notes
%changelog