From: Owen Synge Date: Fri, 29 May 2015 11:34:39 +0000 (+0200) Subject: Add rpm conditionals : tcmalloc X-Git-Tag: v9.0.2~59^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d8abde3338b0c7df373b762e35099ad5123866bf;p=ceph.git Add rpm conditionals : tcmalloc Extracted conditionals from SUSE rpm spec file to forward port. Original work done by Thorsten Behrens Signed-off-by: Owen Synge --- diff --git a/ceph.spec.in b/ceph.spec.in index 4f91080f3848..5738f2a6331a 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -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