From f67a1c739aec527f1624a96b7748495ba937a5f0 Mon Sep 17 00:00:00 2001 From: liquor <1692257904@qq.com> Date: Wed, 8 Apr 2020 15:13:15 +0800 Subject: [PATCH] Add judgement of openEuler --- createrepo_c.spec | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/createrepo_c.spec b/createrepo_c.spec index c7ad94a..7d3e31f 100644 --- a/createrepo_c.spec +++ b/createrepo_c.spec @@ -4,13 +4,13 @@ %global libmodulemd_version 2.3.0 # Bash completion (we need different approach for RHEL-6) -%if 0%{?rhel} == 6 +%if 0%{?openEuler} == 0 && 0%{?rhel} == 6 %global bash_completion %config%{_sysconfdir}/bash_completion.d/createrepo_c.bash %else %global bash_completion %{_datadir}/bash-completion/completions/* %endif -%if 0%{?rhel} && 0%{?rhel} <= 7 +%if 0%{?openEuler} == 0 && 0%{?rhel} && 0%{?rhel} <= 7 %bcond_with python3 %bcond_with drpm %else @@ -18,19 +18,19 @@ %bcond_without drpm %endif -%if 0%{?fedora} > 29 || 0%{?rhel} > 7 +%if 0%{?openEuler} || 0%{?fedora} > 29 || 0%{?rhel} > 7 %bcond_with python2 %else %bcond_without python2 %endif -%if 0%{?rhel} || 0%{?fedora} < 29 +%if 0%{?openEuler} || 0%{?rhel} || 0%{?fedora} < 29 %bcond_with zchunk %else %bcond_without zchunk %endif -%if 0%{?rhel} || 0%{?fedora} < 29 +%if 0%{?openEuler} || 0%{?rhel} || 0%{?fedora} < 29 %bcond_with libmodulemd %else %bcond_without libmodulemd @@ -39,7 +39,7 @@ Summary: Creates a common metadata repository Name: createrepo_c Version: 0.15.0 -Release: 4 +Release: 5 License: GPLv2+ URL: https://github.com/rpm-software-management/createrepo_c Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz @@ -67,7 +67,7 @@ BuildRequires: pkgconfig(modulemd-2.0) >= %{libmodulemd_version} BuildRequires: libmodulemd Requires: libmodulemd%{?_isa} >= %{libmodulemd_version} %endif -%if 0%{?rhel} == 6 +%if 0%{?openEuler} == 0 && 0%{?rhel} == 6 Requires: rpm >= 4.8.0-28 %else BuildRequires: bash-completion @@ -77,7 +77,7 @@ Requires: rpm >= 4.9.0 BuildRequires: drpm-devel >= 0.3.0 %endif -%if 0%{?fedora} || 0%{?rhel} > 7 +%if 0%{?openEuler} || 0%{?fedora} || 0%{?rhel} > 7 Obsoletes: createrepo < 0.11.0 Provides: createrepo = %{version}-%{release} %endif @@ -106,7 +106,7 @@ Summary: Python bindings for the createrepo_c library %{?python_provide:%python_provide python2-%{name}} BuildRequires: python2-devel BuildRequires: python2-nose -%if 0%{?rhel} && 0%{?rhel} <= 7 +%if 0%{?openEuler} == 0 && 0%{?rhel} && 0%{?rhel} <= 7 BuildRequires: python-sphinx %else BuildRequires: python2-sphinx @@ -204,13 +204,13 @@ pushd build-py3 popd %endif -%if 0%{?fedora} || 0%{?rhel} > 7 +%if 0%{?openEuler} || 0%{?fedora} || 0%{?rhel} > 7 ln -sr %{buildroot}%{_bindir}/createrepo_c %{buildroot}%{_bindir}/createrepo ln -sr %{buildroot}%{_bindir}/mergerepo_c %{buildroot}%{_bindir}/mergerepo ln -sr %{buildroot}%{_bindir}/modifyrepo_c %{buildroot}%{_bindir}/modifyrepo %endif -%if 0%{?rhel} && 0%{?rhel} <= 7 +%if 0%{?openEuler} == 0 && 0%{?rhel} && 0%{?rhel} <= 7 %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %else @@ -227,7 +227,7 @@ ln -sr %{buildroot}%{_bindir}/modifyrepo_c %{buildroot}%{_bindir}/modifyrepo %{_libdir}/lib%{name}.so.* %{bash_completion} -%if 0%{?fedora} || 0%{?rhel} > 7 +%if 0%{?openEuler} || 0%{?fedora} || 0%{?rhel} > 7 %{_bindir}/createrepo %{_bindir}/mergerepo %{_bindir}/modifyrepo @@ -262,6 +262,12 @@ ln -sr %{buildroot}%{_bindir}/modifyrepo_c %{buildroot}%{_bindir}/modifyrepo %endif %changelog +* Wed Apr 8 2020 openEuler Buildteam - 0.15.0-5 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Add judgement of openEuler + * Sat Mar 14 2020 openEuler Buildteam - 0.15.0-4 - Add build requires of gdb -- Gitee