1%define RELEASE 1 2%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE} 3%define prefix /usr 4 5Name: %NAME 6Summary: Performance tools for C++ 7Version: %VERSION 8Release: %rel 9Group: Development/Libraries 10URL: http://code.google.com/p/gperftools/ 11License: BSD 12Vendor: Google Inc. and others 13Packager: Google Inc. and others <google-perftools@googlegroups.com> 14Source: http://%{NAME}.googlecode.com/files/%{NAME}-%{VERSION}.tar.gz 15Distribution: Redhat 7 and above. 16Buildroot: %{_tmppath}/%{name}-root 17Prefix: %prefix 18 19%description 20The %name packages contains some utilities to improve and analyze the 21performance of C++ programs. This includes an optimized thread-caching 22malloc() and cpu and heap profiling utilities. 23 24%package devel 25Summary: Performance tools for C++ 26Group: Development/Libraries 27Requires: %{NAME} = %{VERSION} 28 29%description devel 30The %name-devel package contains static and debug libraries and header 31files for developing applications that use the %name package. 32 33%changelog 34 * Mon Apr 20 2009 <opensource@google.com> 35 - Change build rule to use a configure line more like '%configure' 36 - Change install to use DESTDIR instead of prefix for configure 37 - Use wildcards for doc/ and lib/ directories 38 39 * Fri Mar 11 2005 <opensource@google.com> 40 - First draft 41 42%prep 43%setup 44 45%build 46# I can't use '% configure', because it defines -m32 which breaks some 47# of the low-level atomicops files in this package. But I do take 48# as much from % configure (in /usr/lib/rpm/macros) as I can. 49./configure --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} --bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} --datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} --libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} --sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} --infodir=%{_infodir} 50make 51 52%install 53rm -rf $RPM_BUILD_ROOT 54make DESTDIR=$RPM_BUILD_ROOT install 55 56%clean 57rm -rf $RPM_BUILD_ROOT 58 59%files 60%defattr(-,root,root) 61 62%docdir %{prefix}/share/doc/%{NAME}-%{VERSION} 63%{prefix}/share/doc/%{NAME}-%{VERSION}/* 64 65%{_libdir}/*.so.* 66%{_bindir}/pprof 67%{_mandir}/man1/pprof.1* 68 69%files devel 70%defattr(-,root,root) 71 72%{_includedir}/google 73%{_includedir}/gperftools 74%{_libdir}/*.a 75%{_libdir}/*.la 76%{_libdir}/*.so 77%{_libdir}/pkgconfig/*.pc 78