Move all package options to bconds

Related: RHEL-11409
This commit is contained in:
Dan Horák 2023-11-24 10:41:55 +01:00
parent 628bfaeb5e
commit 1f5ae1b284

View File

@ -3,11 +3,15 @@
# secure boot support is for RHEL only # secure boot support is for RHEL only
%if 0%{?rhel} >= 8 %if 0%{?rhel} >= 8
%global signzipl 1 %bcond_without signzipl
%else
%bcond_with signzipl
%endif %endif
%if 0%{?fedora} %if 0%{?fedora}
%global with_pandoc 1 %bcond_without pandoc
%else
%bcond_with pandoc
%endif %endif
%bcond_without rust %bcond_without rust
@ -39,7 +43,7 @@ Source24: 20-zipl-kernel.install
Source25: 52-zipl-rescue.install Source25: 52-zipl-rescue.install
Source26: 91-zipl.install Source26: 91-zipl.install
%if 0%{?signzipl} %if %{with signzipl}
%define pesign_name redhatsecureboot302 %define pesign_name redhatsecureboot302
%endif %endif
@ -162,7 +166,7 @@ make \
HAVE_CARGO=0 \ HAVE_CARGO=0 \
%endif %endif
HAVE_DRACUT=1 \ HAVE_DRACUT=1 \
%if 0%{?with_pandoc} %if %{with pandoc}
ENABLE_DOC=1 \ ENABLE_DOC=1 \
%endif %endif
NO_PIE_LDFLAGS="" \ NO_PIE_LDFLAGS="" \
@ -186,7 +190,7 @@ make install \
HAVE_CARGO=0 \ HAVE_CARGO=0 \
%endif %endif
HAVE_DRACUT=1 \ HAVE_DRACUT=1 \
%if 0%{?with_pandoc} %if %{with pandoc}
ENABLE_DOC=1 \ ENABLE_DOC=1 \
%endif %endif
DESTDIR=%{buildroot} \ DESTDIR=%{buildroot} \
@ -196,7 +200,7 @@ make install \
V=1 V=1
# sign the stage3 bootloader # sign the stage3 bootloader
%if 0%{?signzipl} %if %{with signzipl}
if [ -x /usr/bin/rpm-sign ]; then if [ -x /usr/bin/rpm-sign ]; then
pushd %{buildroot}/lib/s390-tools/ pushd %{buildroot}/lib/s390-tools/
rpm-sign --key "%{pesign_name}" --lkmsign stage3.bin --output stage3.signed rpm-sign --key "%{pesign_name}" --lkmsign stage3.bin --output stage3.signed
@ -999,7 +1003,7 @@ Summary: Use multipath information for re-IPL path failover
BuildRequires: make BuildRequires: make
BuildRequires: bash BuildRequires: bash
BuildRequires: coreutils BuildRequires: coreutils
%if 0%{?with_pandoc} %if %{with pandoc}
BuildRequires: pandoc BuildRequires: pandoc
%endif %endif
BuildRequires: gawk BuildRequires: gawk
@ -1020,7 +1024,7 @@ reconfigures the FCP re-IPL settings to use an operational path.
%files chreipl-fcp-mpath %files chreipl-fcp-mpath
%doc chreipl-fcp-mpath/README.md %doc chreipl-fcp-mpath/README.md
%if 0%{?with_pandoc} %if %{with pandoc}
%doc chreipl-fcp-mpath/README.html %doc chreipl-fcp-mpath/README.html
%endif %endif
%dir %{_prefix}/lib/chreipl-fcp-mpath/ %dir %{_prefix}/lib/chreipl-fcp-mpath/