mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-02 17:56:15 +01:00
Merge pull request #1449 from dmach/rhel-macros
Use %{?rhel} macros in spec
This commit is contained in:
commit
6ed8020c67
3
.github/workflows/build-install.yaml
vendored
3
.github/workflows/build-install.yaml
vendored
@ -73,6 +73,9 @@ jobs:
|
||||
- name: 'Install build dependencies (Fedora/CentOS)'
|
||||
if: ${{ contains(matrix.container, '/fedora:') || contains(matrix.container, '/centos:') }}
|
||||
run: |
|
||||
RHEL_VERSION=$(rpm --eval '%{?rhel}')
|
||||
[ -n "${RHEL_VERSION}" ] && rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-${RHEL_VERSION}.noarch.rpm
|
||||
[ -n "${RHEL_VERSION}" ] && /usr/bin/crb enable
|
||||
dnf -y builddep contrib/osc.spec
|
||||
|
||||
- name: 'Build SRPM and RPMs'
|
||||
|
@ -15,31 +15,31 @@
|
||||
# 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
|
||||
# please note that RHEL build requires packages from CRB and EPEL repositories
|
||||
%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
|
||||
%endif
|
||||
|
||||
%define argparse_manpage_pkg %{use_python_pkg}-argparse-manpage
|
||||
%define obs_build_pkg obs-build
|
||||
%define sphinx_pkg %{use_python_pkg}-Sphinx
|
||||
|
||||
%if 0%{?fedora}
|
||||
%define argparse_manpage_pkg argparse-manpage
|
||||
%define obs_build_pkg obs-build
|
||||
%define openssh_pkg openssh
|
||||
%define sphinx_pkg %{use_python_pkg}-sphinx
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version}
|
||||
%define argparse_manpage_pkg %{use_python_pkg}-argparse-manpage
|
||||
%define obs_build_pkg build
|
||||
%define openssh_pkg openssh-common
|
||||
%define sphinx_pkg %{use_python_pkg}-Sphinx
|
||||
%endif
|
||||
|
||||
Name: osc
|
||||
@ -110,12 +110,8 @@ Recommends: obs-service-source_validator
|
||||
Recommends: obs-service-tar_scm
|
||||
Recommends: obs-service-verify_file
|
||||
|
||||
%if 0%{?fedora}
|
||||
Recommends: openssh
|
||||
%endif
|
||||
%if 0%{?suse_version}
|
||||
Recommends: openssh-common
|
||||
%endif
|
||||
# needed for ssh signature auth
|
||||
Recommends: %{openssh_pkg}
|
||||
|
||||
# needed for `osc browse` that calls xdg-open
|
||||
Recommends: xdg-utils
|
||||
|
Loading…
Reference in New Issue
Block a user