File gperftools.spec of Package gperftools

#
# spec file for package gperftools
#
# Copyright (c) 2014 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 http://bugs.opensuse.org/
#

Name:           gperftools
Version:        2.4
Release:        0
Summary:        Performance Tools for C++
License:        BSD-3-Clause
Group:          Development/Libraries/C and C++
Url:            http://code.google.com/p/gperftools/

Source0:        %{name}-%{version}.tar.gz
Patch4:         %{name}-fix_docdir.patch
Patch12:        %{name}_fix_unassigned_malloc_in_unittest.patch
Patch14:        %{name}_gcc46.patch
BuildRequires:  autoconf >= 2.59
BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRequires:  libunwind-devel
BuildRequires:  pkg-config
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       google-perftools
Obsoletes:      google-perftools
ExcludeArch:    s390 s390x

%description
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 -n libprofiler0
Summary:        CPU and Heap profiling library
Group:          System/Libraries

%description -n libprofiler0
This subpackage contains a library with cpu and heap profiling.

%package -n libtcmalloc4
Summary:        Thread-caching malloc library
Group:          System/Libraries

%description -n libtcmalloc4
This subpackage contains a library with optimized thread-caching
malloc().

%package devel
Summary:        Performance tools for C++
Group:          Development/Libraries/C and C++
Requires:       %name = %version
Requires:       libprofiler0 = %version
Requires:       libstdc++-devel
Requires:       libtcmalloc4 = %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.



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

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

%install
make DESTDIR=$RPM_BUILD_ROOT install
%{__rm} -f %{buildroot}%{_libdir}/*.la

%post   -n libprofiler0 -p /sbin/ldconfig
%postun -n libprofiler0 -p /sbin/ldconfig
%post   -n libtcmalloc4 -p /sbin/ldconfig
%postun -n libtcmalloc4 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%_bindir/pprof
%_mandir/man1/pprof.1.gz
%_docdir/%name

%files -n libprofiler0
%defattr(-,root,root)
%_libdir/libprofiler.so.0*

%files -n libtcmalloc4
%defattr(-,root,root)
%_libdir/libtcmalloc.so.4*
%_libdir/libtcmalloc_debug.so.4*
%_libdir/libtcmalloc_minimal.so.4*
%_libdir/libtcmalloc_minimal_debug.so.4*
%_libdir/libtcmalloc_and_profiler.so.4*

%files devel
%defattr(-,root,root)
%_includedir/google
%_includedir/gperftools
%_libdir/libprofiler.so
%_libdir/libtcmalloc.so
%_libdir/libtcmalloc_debug.so
%_libdir/libtcmalloc_minimal.so
%_libdir/libtcmalloc_minimal_debug.so
%_libdir/libtcmalloc_and_profiler.so
%_libdir/pkgconfig/*.pc

%changelog
openSUSE Build Service is sponsored by