From b1d37f60beb05a6dbfdd1654898a9088e7785d86 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Mon, 20 Nov 2023 13:05:02 +0100 Subject: [PATCH] Use %{?rhel} macros in spec Backport of https://build.opensuse.org/request/show/1123605 --- contrib/osc.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/osc.spec b/contrib/osc.spec index 22727cf6b7..b85f9738b6 100644 --- a/contrib/osc.spec +++ b/contrib/osc.spec @@ -15,15 +15,15 @@ # need to override python_sitelib because it is not set as we would expect on many distros %define python_sitelib %(RPM_BUILD_ROOT= %{use_python} -Ic "import sysconfig; print(sysconfig.get_path('purelib'))") -# generate manpages on distros where argparse-manpage >= 3 is available -%if 0%{?suse_version} > 1500 || 0%{?fedora} >= 37 +# generate manpages on distros where argparse-manpage >= 3 and python3-Sphinx are available +%if 0%{?suse_version} > 1500 || 0%{?fedora} >= 37 || 0%{?rhel} >= 9 %bcond_without man %else %bcond_with man %endif # whether to use fdupes to deduplicate python bytecode -%if 0%{?suse_version} || 0%{?fedora} +%if 0%{?suse_version} || 0%{?fedora} || 0%{?rhel} >= 8 %bcond_without fdupes %else %bcond_with fdupes @@ -33,7 +33,7 @@ %define obs_build_pkg obs-build %define sphinx_pkg %{use_python_pkg}-Sphinx -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?rhel} >= 9 %define argparse_manpage_pkg argparse-manpage %define sphinx_pkg %{use_python_pkg}-sphinx %endif @@ -110,7 +110,7 @@ Recommends: obs-service-source_validator Recommends: obs-service-tar_scm Recommends: obs-service-verify_file -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?rhel} Recommends: openssh %endif %if 0%{?suse_version}