Skip to content

Commit

Permalink
Merge pull request #302 from arogge/dev/arogge/bareos-17.2/specfiles-…
Browse files Browse the repository at this point in the history
…for-docker

packaging: make specfiles compatible to docker (backport 17.2)
  • Loading branch information
arogge committed Oct 9, 2019
2 parents 3d27bbc + b04d4bc commit 55dc78c
Showing 1 changed file with 42 additions and 5 deletions.
47 changes: 42 additions & 5 deletions platforms/packaging/bareos.spec
Expand Up @@ -54,6 +54,11 @@ Vendor: The Bareos Team
%define use_libwrap 1
%endif

# rhel/centos 6 must not be built with libtirpc installed
%if 0%{?rhel} == 6
BuildConflicts: libtirpc-devel
%endif

# fedora 28: rpc was removed from libc
%if 0%{?fedora} >= 28 || 0%{?rhel} > 7
BuildRequires: rpcgen
Expand Down Expand Up @@ -120,7 +125,15 @@ BuildRequires: libtirpc-devel
%define systemd_support 1
%endif

%if 0%{?rhel_version} >= 700
%if 0%{?rhel_version} == 800
%define droplet 0
%endif

%if 0%{?rhel_version} >= 700 && !0%{?centos_version}
%define ceph 1
%endif

%if 0%{?centos} >= 8
%define ceph 1
%endif

Expand All @@ -142,19 +155,31 @@ BuildRequires: glusterfs-devel glusterfs-api-devel
%endif

%if 0%{?ceph}
%if 0%{?sle_version} >= 120200
%if 0%{?sle_version} >= 120200
BuildRequires: libcephfs-devel
BuildRequires: librados-devel
%else
%else
# the rhel macro is set in docker, but not in obs
%if 0%{?rhel} == 7
BuildRequires: librados2-devel
BuildRequires: libcephfs1-devel
%else
%if 0%{?rhel} == 8
BuildRequires: librados-devel
BuildRequires: libradosstriper-devel
BuildRequires: libcephfs-devel
%else
BuildRequires: ceph-devel
%endif
%endif
%endif
%endif
%endif

%if 0%{?have_git}
BuildRequires: git-core
%endif

Source0: %{name}-%{version}.tar.gz
Source0: %{name}-%{version}.tar.bz2

#BuildRequires: elfutils
BuildRequires: gcc
Expand Down Expand Up @@ -187,13 +212,21 @@ BuildRequires: libcap-devel
BuildRequires: mtx

%if 0%{?build_qt_monitor}
%if 0%{?suse_version}
BuildRequires: libqt4-devel
%else
BuildRequires: qt-devel
%endif
%endif


%if 0%{?python_plugins}
%if 0%{?centos_version} >= 800 || 0%{?rhel_version} >= 800 || 0%{?fedora} >= 31
BuildRequires: python2-devel >= 2.6
%else
BuildRequires: python-devel >= 2.6
%endif
%endif

%if 0%{?suse_version}

Expand Down Expand Up @@ -280,6 +313,10 @@ Bareos source code has been released under the AGPL version 3 license.
%description
%{dscr}

%if 0%{?opensuse_version} || 0%{?sle_version}
%debug_package
%endif

# Notice : Don't try to change the order of package declaration
# You will have side effect with PreReq

Expand Down

0 comments on commit 55dc78c

Please sign in to comment.