#
# spec file for package sle-ha-release (Version 16.0)
#
# Copyright (c) 2024 SUSE.
#
# 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.


Name:           sle-ha-release
%define         product sle-ha
%if 0%{?beta_flag} == 1
%define betaversion %{current_milestone}
%endif
Summary:        SUSE Linux Enterprise Server High Availability Extension%{?betaversion: %{betaversion}}
Version:        16.0
#!BcntSyncTag: sle-ha
Release:        0
License:        BSD-3-Clause
Group:          System/Fhs
%global debug_package %{nil}

Provides:       %name-%version
Provides:       product() = sle-ha
Provides:       product(sle-ha) = %{version}-%{release}
%ifarch x86_64
Provides:       product-register-target() = sle%%2D16%%2Dx86_64
%endif
%ifarch s390x
Provides:       product-register-target() = sle%%2D16%%2Ds390x
%endif
%ifarch aarch64
Provides:       product-register-target() = sle%%2D16%%2Daarch64
%endif
%ifarch ppc64le
Provides:       product-register-target() = sle%%2D16%%2Dppc64le
%endif
Provides:       product-label() = SLEHA16.0
Provides:       product-cpeid() = cpe%%3A%%2Fo%%3Asuse%%3Asle%%2Dha%%3A16%%3A16.0
Provides:       product-url(releasenotes) = https%%3A%%2F%%2Fwww.suse.com%%2Freleasenotes%%2F%{_target_cpu}%%2FSLE%%2DHA%%2F16.0%%2Frelease%%2Dnotes%%2Dha.rpm
Provides:       product-url(releasenotes) = https%%3A%%2F%%2Fwww.suse.com%%2Freleasenotes%%2F%{_target_cpu}%%2FSUSE%%2DSLES%%2F16.0%%2Frelease%%2Dnotes%%2Dsles.rpm
Provides:       product-endoflife() = 2027%%2D11%%2D30

Requires:       product(SLES) = %{version}

AutoReqProv:    on
# this package should only be available for the "basearchs" of a product
ExclusiveArch: x86_64 s390x aarch64 ppc64le
%description
This extension contains the High Availability packages for SLES




%prep

%build

%install
mkdir -p %{buildroot}%{_sysconfdir}/products.d
cat >%{buildroot}%{_sysconfdir}/products.d/sle-ha.prod << EOF
<?xml version="1.0" encoding="UTF-8"?>
<product schemeversion="0">
  <vendor>SUSE</vendor>
  <name>sle-ha</name>
  <version>16.0</version>
  <release>1</release>
  <endoflife>2027-11-30</endoflife>
  <arch>%{_target_cpu}</arch>
  <cpeid>cpe:/o:suse:sle-ha:16:16.0</cpeid>
  <productline>sle-ha</productline>
  <codestream>
    <name>SUSE Linux Enterprise Server High Availability Extension 16</name>
    <endoflife>2035-11-30</endoflife>
  </codestream>
  <register>
    <flavor>module</flavor>
    <pool>
      <repository project="SUSE:Products:HA:16.0:x86_64" name="images" medium="product" arch="x86_64">
        <zypp name="SLES-HA-16.0-Pool" alias="SLES-HA-16.0-Pool"/>
      </repository>
      <repository project="SUSE:Products:HA:16.0:s390x" name="images" medium="product" arch="s390x">
        <zypp name="SLES-HA-16.0-Pool" alias="SLES-HA-16.0-Pool"/>
      </repository>
      <repository project="SUSE:Products:HA:16.0:aarch64" name="images" medium="product" arch="aarch64">
        <zypp name="SLES-HA-16.0-Pool" alias="SLES-HA-16.0-Pool"/>
      </repository>
      <repository project="SUSE:Products:HA:16.0:ppc64le" name="images" medium="product" arch="ppc64le">
        <zypp name="SLES-HA-16.0-Pool" alias="SLES-HA-16.0-Pool"/>
      </repository>
      <repository project="SUSE:Products:HA:16.0:x86_64" name="images" medium="product_debug" arch="x86_64">
        <zypp name="SLES-HA-16.0-Debuginfo-Pool" alias="SLES-HA-16.0-DebugInfo-Pool"/>
      </repository>
      <repository project="SUSE:Products:HA:16.0:s390x" name="images" medium="product_debug" arch="s390x">
        <zypp name="SLES-HA-16.0-Debuginfo-Pool" alias="SLES-HA-16.0-DebugInfo-Pool"/>
      </repository>
      <repository project="SUSE:Products:HA:16.0:aarch64" name="images" medium="product_debug" arch="aarch64">
        <zypp name="SLES-HA-16.0-Debuginfo-Pool" alias="SLES-HA-16.0-DebugInfo-Pool"/>
      </repository>
      <repository project="SUSE:Products:HA:16.0:ppc64le" name="images" medium="product_debug" arch="ppc64le">
        <zypp name="SLES-HA-16.0-Debuginfo-Pool" alias="SLES-HA-16.0-DebugInfo-Pool"/>
      </repository>
      <repository project="SUSE:Products:HA:16.0:x86_64" name="images" medium="product_source" arch="x86_64">
        <zypp name="SLES-HA-16.0-Source-Pool" alias="SLES-HA-16.0-Source-Pool"/>
      </repository>
      <repository project="SUSE:Products:HA:16.0:s390x" name="images" medium="product_source" arch="s390x">
        <zypp name="SLES-HA-16.0-Source-Pool" alias="SLES-HA-16.0-Source-Pool"/>
      </repository>
      <repository project="SUSE:Products:HA:16.0:aarch64" name="images" medium="product_source" arch="aarch64">
        <zypp name="SLES-HA-16.0-Source-Pool" alias="SLES-HA-16.0-Source-Pool"/>
      </repository>
      <repository project="SUSE:Products:HA:16.0:ppc64le" name="images" medium="product_source" arch="ppc64le">
        <zypp name="SLES-HA-16.0-Source-Pool" alias="SLES-HA-16.0-Source-Pool"/>
      </repository>
    </pool>
    <updates>
      <distrotarget arch="x86_64">sle-16-x86_64</distrotarget>
      <distrotarget arch="s390x">sle-16-s390x</distrotarget>
      <distrotarget arch="aarch64">sle-16-aarch64</distrotarget>
      <distrotarget arch="ppc64le">sle-16-ppc64le</distrotarget>
    </updates>
  </register>
  <repositories>
%ifarch x86_64
      <repository type="pool" repoid="obsproduct://build.suse.de/SUSE:Products:HA:16.0:x86_64/sle-ha/16.0/%{_target_cpu}" />
%endif
%ifarch s390x
      <repository type="pool" repoid="obsproduct://build.suse.de/SUSE:Products:HA:16.0:s390x/sle-ha/16.0/%{_target_cpu}" />
%endif
%ifarch aarch64
      <repository type="pool" repoid="obsproduct://build.suse.de/SUSE:Products:HA:16.0:aarch64/sle-ha/16.0/%{_target_cpu}" />
%endif
%ifarch ppc64le
      <repository type="pool" repoid="obsproduct://build.suse.de/SUSE:Products:HA:16.0:ppc64le/sle-ha/16.0/%{_target_cpu}" />
%endif
  </repositories>
  <summary>SUSE Linux Enterprise Server High Availability Extension</summary>
  <shortsummary>SUSE Linux Enterprise Server High Availability Extension</shortsummary>
  <shortsummary>SLEHA16.0</shortsummary>
  <description>This extension contains the High Availability packages for SLES</description>
  <linguas>
    <language>en</language>
  </linguas>
  <urls>
    <url name="releasenotes">https://www.suse.com/releasenotes/%{_target_cpu}/SLE-HA/16.0/release-notes-ha.rpm</url>
    <url name="releasenotes">https://www.suse.com/releasenotes/%{_target_cpu}/SUSE-SLES/16.0/release-notes-sles.rpm</url>
  </urls>
  <buildconfig>
    <producttheme>SLES</producttheme>
  </buildconfig>
  <installconfig>
    <defaultlang>en_US</defaultlang>
    <releasepackage name="%{name}" flag="EQ" version="%{version}" release="%{release}"/>
    <distribution>SUSE_SLE</distribution>
  </installconfig>
  <runtimeconfig/>
  <productdependency relationship="requires" name="SLES" baseversion="16.0" flag="EQ"/>
</product>

EOF



%files
%defattr(644,root,root,755)
%dir %{_sysconfdir}/products.d
%{_sysconfdir}/products.d/*.prod

%changelog
