SPECS: LeakTracer.spec (NEW) - simple and useful tool for hunting ...
pluto
pluto at pld-linux.org
Sat Dec 10 17:23:59 CET 2005
Author: pluto Date: Sat Dec 10 16:23:59 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- simple and useful tool for hunting mem leaks.
---- Files affected:
SPECS:
LeakTracer.spec (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SPECS/LeakTracer.spec
diff -u /dev/null SPECS/LeakTracer.spec:1.1
--- /dev/null Sat Dec 10 17:23:59 2005
+++ SPECS/LeakTracer.spec Sat Dec 10 17:23:45 2005
@@ -0,0 +1,66 @@
+# $Revision$, $Date$
+Summary: A tool for trace and analyze memory leaks in C++ programs
+Name: LeakTracer
+Version: 2.3
+Release: 1
+License: Public Domain
+Group: Applications
+Source0: http://www.andreasen.org/%{name}/LeakTracer.tar.gz
+# Source0-md5: e1cf9d03c12a45d39f253e558d231438
+Patch0: %{name}-Makefile.patch
+URL: http://www.andreasen.org/LeakTracer/
+BuildRequires: sed >= 4.0
+Requires: gdb
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+LeakTracer is a small tool for checking a C++ program for memory
+leaks. To use LeakTracer, run your program using the provided
+LeakCheck script. It uses the LD_PRELOAD feature to "overlay" some
+functions on top of your functions (no recompile needed). leak-anlyze
+uses gdb to print out the exact line where the memory was allocated
+and not freed - this of course means you have to free all dynamically
+allocated data. LeakTracer also overrides the global operator new and
+operator delete - this will give problems if you override them as
+well. LeakTracer traces only new/new[] and delete calls - it does not
+look at malloc/free/realloc.
+
+%prep
+%setup -q -n %{name}
+%patch0 -p1
+
+%build
+sed -i "s:SHLIB=.*:SHLIB=%{_libdir}/LeakTracer.so:" LeakCheck
+
+%{__make} \
+ CXX="%{__cxx}" \
+ CXXFLAGS="%{rpmcflags}"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}}
+
+install leak-analyze $RPM_BUILD_ROOT%{_bindir}
+install LeakCheck $RPM_BUILD_ROOT%{_bindir}
+install LeakTracer.so $RPM_BUILD_ROOT%{_libdir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README
+%attr(755,root,root) %{_bindir}/*
+%attr(755,root,root) %{_libdir}/*.so
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2005/12/10 16:23:45 pluto
+- simple and useful tool for hunting mem leaks.
================================================================
More information about the pld-cvs-commit
mailing list