]> git.pld-linux.org Git - packages/LeakTracer.git/blame - LeakTracer.spec
- fix amd64 version.
[packages/LeakTracer.git] / LeakTracer.spec
CommitLineData
96e48a11
PS
1Summary: A tool for trace and analyze memory leaks in C++ programs
2Name: LeakTracer
3Version: 2.3
4Release: 1
5License: Public Domain
6Group: Applications
e23bdcbe 7Source0: http://www.andreasen.org/LeakTracer/LeakTracer.tar.gz
96e48a11
PS
8# Source0-md5: e1cf9d03c12a45d39f253e558d231438
9Patch0: %{name}-Makefile.patch
c8cfd0aa
PS
10Patch1: %{name}-64bit.patch
11Patch2: %{name}-caller_addr.patch
96e48a11
PS
12URL: http://www.andreasen.org/LeakTracer/
13BuildRequires: sed >= 4.0
14Requires: gdb
15BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17%description
18LeakTracer is a small tool for checking a C++ program for memory
19leaks. To use LeakTracer, run your program using the provided
20LeakCheck script. It uses the LD_PRELOAD feature to "overlay" some
21functions on top of your functions (no recompile needed). leak-anlyze
22uses gdb to print out the exact line where the memory was allocated
23and not freed - this of course means you have to free all dynamically
24allocated data. LeakTracer also overrides the global operator new and
25operator delete - this will give problems if you override them as
26well. LeakTracer traces only new/new[] and delete calls - it does not
27look at malloc/free/realloc.
28
29%prep
30%setup -q -n %{name}
31%patch0 -p1
c8cfd0aa
PS
32%patch1 -p0
33%patch2 -p0
96e48a11
PS
34
35%build
36sed -i "s:SHLIB=.*:SHLIB=%{_libdir}/LeakTracer.so:" LeakCheck
37
38%{__make} \
39 CXX="%{__cxx}" \
dc4b537c 40 CXXFLAGS="%{rpmcxxflags} -nodefaultlibs"
96e48a11
PS
41
42%install
43rm -rf $RPM_BUILD_ROOT
44install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}}
45
46install leak-analyze $RPM_BUILD_ROOT%{_bindir}
47install LeakCheck $RPM_BUILD_ROOT%{_bindir}
48install LeakTracer.so $RPM_BUILD_ROOT%{_libdir}
49
50%clean
51rm -rf $RPM_BUILD_ROOT
52
53%post -p /sbin/ldconfig
54%postun -p /sbin/ldconfig
55
56%files
57%defattr(644,root,root,755)
58%doc README
59%attr(755,root,root) %{_bindir}/*
60%attr(755,root,root) %{_libdir}/*.so
This page took 0.083814 seconds and 4 git commands to generate.