File gperftools.spec of Package gperftools

# spec file for package gperftools
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           gperftools
Version:        2.0
Release:        0
Group:          System/Libraries
License:        BSD-3-Clause
Source0:        %{name}-%{version}.tar.bz2
Patch4:         %{name}-fix_docdir.patch
Patch11:	%{name}_fix_multiple_install_headers.patch
Patch12:	%{name}_fix_unassigned_malloc_in_unittest.patch
Patch14:        %{name}_gcc46.patch
BuildRequires:  gcc-c++ pkg-config autoconf automake libtool libunwind-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        Performance Tools for C++
Provides:	google-perftools
Obsoletes:	google-perftools

The gperftools package contains some utilities to improve and analyze the
performance of C++ programs.  This includes an optimized thread-caching
malloc() and cpu and heap profiling utilities.

%package devel
Group:          System/Libraries
Summary:        Performance tools for C++
Requires:       libstdc++-devel, gperftools = %{version}
Provides:	google-perftools-devel
Obsoletes:	google-perftools-devel

%description devel
The gperftools-devel package contains static and debug libraries and header
files for developing applications that use the gperftools package.

%setup -q
%patch4 -p1
%patch11 -p1
%patch12 -p1
%patch14 -p1

autoreconf -fi
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \
%configure --disable-static --with-gnu-ld --with-pic
make %{?_smp_mflags}

%{__rm} -f %{buildroot}%{_libdir}/*.la

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

# %_libdir/*   # got removed in 0.96

%files devel
# %_libdir/libstacktrace.*a    # got removed in 0.96
# %_libdir/    # got removed in 0.96