]> git.pld-linux.org Git - packages/LeakTracer.git/blob - LeakTracer.spec
- typo
[packages/LeakTracer.git] / LeakTracer.spec
1 Summary:        A tool for trace and analyze memory leaks in C++ programs
2 Summary(pl):    Narzêdzie do ¶ledzenia i analizowania wycieków pamiêci w programach w C++
3 Name:           LeakTracer
4 Version:        2.4
5 Release:        1
6 License:        Public Domain
7 Group:          Applications
8 Source0:        http://www.andreasen.org/LeakTracer/LeakTracer.tar.gz
9 # Source0-md5:  e1cf9d03c12a45d39f253e558d231438
10 Patch0:         %{name}-Makefile.patch
11 Patch1:         %{name}-64bit.patch
12 Patch2:         %{name}-caller_addr.patch
13 URL:            http://www.andreasen.org/LeakTracer/
14 BuildRequires:  gcc-c++
15 BuildRequires:  sed >= 4.0
16 Requires:       gdb
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %description
20 LeakTracer is a small tool for checking a C++ program for memory
21 leaks. To use LeakTracer, run your program using the provided
22 LeakCheck script. It uses the LD_PRELOAD feature to "overlay" some
23 functions on top of your functions (no recompile needed). leak-analyze
24 uses gdb to print out the exact line where the memory was allocated
25 and not freed - this of course means you have to free all dynamically
26 allocated data. LeakTracer also overrides the global operator new and
27 operator delete - this will give problems if you override them as
28 well. LeakTracer traces only new/new[] and delete calls - it does not
29 look at malloc/free/realloc.
30
31 %description -l pl
32 LeakTracer to ma³e narzêdzie do sprawdzania programów w C++ pod k±tem
33 wycieków pamiêci. Aby go u¿yæ na jakim¶ programie, trzeba uruchomiæ
34 ten program przy u¿yciu za³±czonego skryptu LeakCheck. U¿ywa on
35 LD_PRELOAD do przykrycia niektórych funkcji (rekompilacja nie jest
36 potrzebna). leak-analyze u¿ywa gdb do pokazania w których dok³adnie
37 liniach pamiêæ zosta³a przydzielona i nie zwolniona - co oznacza, ¿e
38 trzeba zwolniæ wszystkie dynamicznie przydzielone dane. LeakTracer
39 przykrywa tak¿e globalne operatory new i delete - mo¿e to spowodowaæ
40 problemy, je¶li my tak¿e chcemy je przykryæ. LeakTracer ¶ledzi tylko
41 wywo³ania new/new[] i delete - nie patrzy na malloc/free/realloc.
42
43 %prep
44 %setup -q -n %{name}
45 %patch0 -p1
46 %patch1 -p0
47 %patch2 -p0
48
49 %build
50 sed -i "s:SHLIB=.*:SHLIB=%{_libdir}/LeakTracer.so:" LeakCheck
51
52 %{__make} \
53         CXX="%{__cxx}" \
54         CXXFLAGS="%{rpmcxxflags} -nodefaultlibs -O1 -fno-omit-frame-pointer"
55
56 %install
57 rm -rf $RPM_BUILD_ROOT
58 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}}
59
60 install leak-analyze    $RPM_BUILD_ROOT%{_bindir}
61 install LeakCheck       $RPM_BUILD_ROOT%{_bindir}
62 install LeakTracer.so   $RPM_BUILD_ROOT%{_libdir}
63
64 %clean
65 rm -rf $RPM_BUILD_ROOT
66
67 %post   -p /sbin/ldconfig
68 %postun -p /sbin/ldconfig
69
70 %files
71 %defattr(644,root,root,755)
72 %doc README
73 %attr(755,root,root) %{_bindir}/*
74 %attr(755,root,root) %{_libdir}/*.so
This page took 0.060933 seconds and 4 git commands to generate.