]> git.apps.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)
committerNathan Cutler <ncutler@suse.com>
Tue, 27 Oct 2015 10:24:17 +0000 (11:24 +0100)
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>
(cherry picked from commit d8abde3338b0c7df373b762e35099ad5123866bf)

ceph.spec.in

index 3f936c5f9e356a0da0243eb8971955f4a5e79f44..1e665a5a11058e91407b9b120561189dfcfd2e48 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())")}
@@ -101,7 +102,9 @@ BuildRequires:      net-tools
 Requires:      python-Flask
 %if 0%{?suse_version} > 1210
 Requires:      gptfdisk
+%if 0%{with tcmalloc}
 BuildRequires: gperftools-devel
+%endif
 %else
 Requires:      scsirastools
 BuildRequires: google-perftools-devel
@@ -122,6 +125,7 @@ Requires(preun):initscripts
 BuildRequires: gperftools-devel
 Requires:      python-flask
 %endif
+%endif
 
 %description
 Ceph is a massively scalable, open-source, distributed
@@ -492,6 +496,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