]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Add rpm conditionals : tcmalloc
authorOwen Synge <osynge@suse.com>
Fri, 29 May 2015 11:34:39 +0000 (13:34 +0200)
committerOwen Synge <osynge@suse.com>
Wed, 3 Jun 2015 13:57:16 +0000 (15:57 +0200)
Extracted conditionals from SUSE rpm spec file to forward port.
Original work done by Thorsten Behrens <tbehrens@suse.com>

Signed-off-by: Owen Synge <osynge@suse.com>
ceph.spec.in

index 4f91080f3848efc670400b08fc5a2062cbcd0857..5738f2a6331a876a22972a5b51f5d4992db518a7 100644 (file)
@@ -1,6 +1,7 @@
 %bcond_with ocf
 %bcond_without cephfs_java
 %bcond_with tests
+%bcond_without tcmalloc
 
 %if (0%{?el5} || (0%{?rhel_version} >= 500 && 0%{?rhel_version} <= 600))
 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
@@ -111,7 +112,9 @@ BuildRequires:      sharutils
 BuildRequires: git
 %if 0%{?suse_version} > 1210
 Requires:      gptfdisk
+%if 0%{with tcmalloc}
 BuildRequires: gperftools-devel
+%endif
 %else
 Requires:      scsirastools
 BuildRequires: google-perftools-devel
@@ -133,6 +136,7 @@ Requires(preun):    chkconfig
 Requires(preun):       initscripts
 BuildRequires: gperftools-devel
 %endif
+%endif
 
 %description
 Ceph is a massively scalable, open-source, distributed
@@ -504,6 +508,7 @@ export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
 %endif
                $MY_CONF_OPT \
                %{?_with_ocf} \
+               %{?_with_tcmalloc} \
                CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
 
 # fix bug in specific version of libedit-devel