%define name memprof %define version 0.5.1 %define release 3mdk Summary: Tool for memory profiling and leak detection Name: %{name} Version: %{version} Release: %{release} License: GPL Group: Development/Other Source0: http://people.redhat.com/~otaylor/memprof/%{name}-%{version}.tar.bz2 Source1: memprof-icons.tar.bz2 Source2: memprof-manpage.bz2 # FIXME: not ideal solution? Patch0: memprof-0.5.1-destructor.patch.bz2 Patch1: memprof-0.5.1-force-static-libbfd.patch.bz2 URL: http://www.gnome.org/projects/memprof/ ExclusiveArch: %{ix86} Requires: GConf2 BuildRequires: libbinutils-devel, libglade2.0-devel, libgnomeui2-devel BuildRoot: %{_tmppath}/%{name}-buildroot %description MemProf is a tool for profiling memory usage and detecting memory leaks. It can be used with existing binaries without need for recompilation. %prep %setup -q %patch0 -p1 -b .destructor %patch1 -p1 -b .force-static-libbfd %build %configure2_5x --libdir=%{_libdir}/memprof %make %install rm -rf $RPM_BUILD_ROOT # needed otherwise gconf database installation will fail GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 %makeinstall_std # man page mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 bzcat %{SOURCE2} > $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1 # mdk menu (cd $RPM_BUILD_ROOT mkdir -p ./%_menudir cat > ./%_menudir/%{name} <<EOF ?package(%{name}):\ command="%{_bindir}/memprof"\ title="Memprof"\ icon="%{name}.png"\ longtitle="Tool for memory profiling and leak detection"\ needs="x11"\ section="Applications/Development/Tools" EOF ) # mdk icons mkdir -p $RPM_BUILD_ROOT%{_iconsdir} tar jxvf %{SOURCE1} -C $RPM_BUILD_ROOT%{_iconsdir}/ # remove unpackaged files rm -f $RPM_BUILD_ROOT%{_libdir}/memprof/libmemintercept.{a,la} # find i18n files %find_lang %{name} %post %{update_menus} [[ -x %{_bindir}/scrollkeeper-update ]] && { %{_bindir}/scrollkeeper-update -q || /bin/true } GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \ %{_bindir}/gconftool-2 --makefile-install-rule \ %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null %preun if [ "$1" = "0" ]; then GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \ %{_bindir}/gconftool-2 --makefile-uninstall-rule \ %{_sysconfdir}/gconf/schemas/%{name}.schemas > /dev/null fi %postun %{clean_menus} [[ -x %{_bindir}/scrollkeeper-update ]] && { %{_bindir}/scrollkeeper-update -q || /bin/true } %clean rm -rf $RPM_BUILD_ROOT %files -f %{name}.lang %defattr(-,root,root) # %doc README AUTHORS COPYING NEWS ChangeLog %{_mandir}/man1/%{name}.1* # %{_bindir}/%{name} # %dir %{_libdir}/memprof %{_libdir}/memprof/libmemintercept.so # %{_sysconfdir}/gconf/schemas/memprof.schemas %{_datadir}/applications/memprof.desktop %{_datadir}/pixmaps/memprof.png %dir %{_datadir}/%{name} %{_datadir}/memprof/leak.xpm %{_datadir}/memprof/memprof.glade %{_datadir}/memprof/memprof.png # %{_menudir}/%{name} # %{_miconsdir}/%{name}.png %{_iconsdir}/%{name}.png %{_liconsdir}/%{name}.png %changelog * Fri Jul 18 2003 Frederic Crozat <fcrozat@mandrakesoft.com> - 0.5.1-3mdk - Rebuild against latest ORBit2 * Sat Feb 8 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.5.1-2mdk - Patch1: Force link against static libbfd * Fri Jan 17 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.5.1-1mdk - 0.5.1 - Patch0: Use a destructor instead of overriding _exit() in case it bypasses the PLT within libc, thus hidding the fact that we exitted * Fri Apr 5 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.4.1-9mdk - Yet another binutils joined the family * Wed Mar 20 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.4.1-8mdk - A new binutils was born * Wed Dec 26 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.4.1-7mdk - Really rebuild against new libbfd. Don't trust Titi since he hasn't checked whether new binutils were actually installed. * Thu Dec 20 2001 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.4.1-6mdk - rebuild for new libbfd * Fri Dec 7 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.4.1-5mdk - Use %%makeinstall_std - Source4: Add manpage from Debian package - Actually, libmemintercept.so is a MemProf plug-in. Therefore, move it to %{_libdir}/memprof/ and don't care about static libraries - Patch1: Increase starter_mem to 16 KB instead of 1 KB, reportedly too small for some applications * Sat Jul 07 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.4.1-4mdk - Rebuild. * Mon Jun 25 2001 Jeff Garzik <jgarzik@mandrakesoft.com> 0.4.1-3mdk - fixes for 64-bit machines - remove ExclusiveArch - regenerate autoconf/automake/libtool files on each build * Mon Apr 9 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 0.4.1-2mdk - sanitized specfile (s/Copyright/License, BuildRequires, etc.) - added i18n files - added mdk menu - added mdk icons * Mon Feb 12 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.4.1-1mdk - New and shiny source for general consumption. - Add a url for the source tag and a new url tag. * Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 0.4.0-2mdk - automatically added BuildRequires * Mon Jul 24 2000 Frederic Crozat <fcrozat@mandrakesoft.com> 0.4.0-1mdk - Release 0.4.0 (from helix) - BM * Thu Jun 29 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.3.0-7mdk - Macrozification. - Recompile again last binutils. * Fri Apr 07 2000 Christopher Molnar <molnarc@mandrakesoft.com> 0.3.0-6mdk - new groups - added documentation * Sun Mar 19 2000 John Buswell <johnb@mandrakesoft.com> 0.3.0-5mdk - Added PPC support * Wed Jan 19 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.3.0-4mdk - Use a %configure. * Mon Nov 15 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com> - First mandrake release. * Wed Oct 27 1999 Owen Taylor <otaylor@redhat.com> - Initial package