File memprof.spec of Package memprof

#
# spec file for package memprof (Version 0.6)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name:           memprof
BuildRequires:  binutils-devel fdupes intltool libglade2-devel libgnomeui-devel perl-XML-Parser translation-update-upstream update-desktop-files
%define prefix   /usr
Summary:        A Memory Profiler with GNOME Interface
Version:        0.6
Release:        253
License:        GPL v2 or later
Group:          Development/Tools/Debuggers
Source:         %name-%version.tar.bz2
Patch:          %name.diff
Patch1:         %name-0.5.1-protos.patch
Patch3:         %name-0.5.1-desktop.patch
Patch4:         memprof-build-error.patch
Patch5:         memprof-0.6-nonx86.patch
Patch6:         memprof-0.6-bfd.patch
Url:            http://www.gnome.org/projects/memprof/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
AutoReqProv:    on
Requires:       %{name}-lang = %{version}
%gconf_schemas_prereq

%description
With this application, profile applications for their memory
requirements and hunt for leaks very easily.



%lang_package
%prep
%setup -q
translation-update-upstream
%patch
%patch1
%patch3
%patch4
%patch5
%patch6

%build
%{?suse_update_config:%{suse_update_config -f }}
intltoolize --force --copy
autoreconf -fi
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
./configure --prefix=%{prefix} \
	--libdir=%{prefix}/%_lib \
	--without-debug \
	--sysconfdir=/etc \
	--disable-static 
make

%install
make install DESTDIR=$RPM_BUILD_ROOT GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
# Change sr@Latn to sr@latin
mv %{buildroot}%{_datadir}/locale/sr@Latn %{buildroot}%{_datadir}/locale/sr@latin
%{find_lang} memprof
%find_gconf_schemas
cat memprof.schemas_list > memprof.lst
%suse_update_desktop_file %name Development Profiling
%fdupes $RPM_BUILD_ROOT

%pre -f memprof.schemas_pre

%post 
/sbin/ldconfig
%posttrans -f memprof.schemas_pre

%preun -f memprof.schemas_preun

%postun
/sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files -f memprof.lst
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{prefix}/bin/*
%dir %{prefix}/%_lib/memprof
%{prefix}/%_lib/memprof/*.so
%{prefix}/%_lib/memprof/*.la
%{prefix}/share/memprof
%{prefix}/share/pixmaps/*
%{prefix}/share/applications/memprof.desktop
# /etc/gconf/schemas/memprof.schemas

%files lang -f %{name}.lang

%changelog
* Mon Feb 16 2009 sbrabec@suse.cz
- Added support for translation-update-upstream (FATE#301344).
* Sat Jan 31 2009 vuntz@novell.com
- Use sr@latin instead of sr@Latn.
* Mon Jul 14 2008 schwab@suse.de
- Fix check for libbfd.
* Tue Jan 22 2008 aj@suse.de
- Fix open call.
* Tue Aug 07 2007 maw@suse.de
- Use %%fdupes
- Split off a -lang subpackage
- s#%%run_ldconfig#/sbin/ldconfig/ in %%post and %%postun.
* Wed Mar 28 2007 maw@suse.de
- Add the magic gconf schemas stuff.
* Mon Jan 22 2007 aj@suse.de
- Move to /usr.
- Cleanup BuildRequires.
* Thu Jan 11 2007 schwab@suse.de
- Add binutils-devel to BuildRequires.
* Sun Oct 15 2006 ro@suse.de
- try to fix build for non-x86
* Fri Oct 13 2006 danw@suse.de
- Remove dead patch
* Mon Sep 25 2006 jhargadon@suse.de
- update to version 0.6
- Rewritten profiling module that handles recursion better
- Display the call tree of functions
- Many bug fixes
- New and updated translations
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Nov 03 2004 ro@suse.de
- locale rename: no -> nb
* Thu Aug 05 2004 ro@suse.de
- make it build with current binutils
- recode desktop file to utf-8
* Fri Jul 09 2004 uli@suse.de
- fixed to build on non-x86 systems
* Wed May 12 2004 clahey@suse.de
- Disable gconf makefile install rule.
* Sat Jan 10 2004 adrian@suse.de
- build as user
* Fri Dec 19 2003 pthomas@suse.de
- Refresh configury via autoreconf.
- Require intltool and run intltoolize.
- Disable building the unneeded static version of libmemintercept
  and explicitly package the dynamic one.
- Call find_lang in specfile.
* Sat Aug 16 2003 adrian@suse.de
- update to version 0.5.1 (Gnome 2 based)
- hopefully correct fixed for non-ix86
- add Categories
* Fri Sep 27 2002 ro@suse.de
- Added alsa alsa-devel to neededforbuild (esound)
* Fri Jul 26 2002 adrian@suse.de
- fix neededforbuild
* Fri May 31 2002 ro@suse.de
- fix build on lib64 platforms
* Fri Feb 01 2002 ro@suse.de
- changed neededforbuild <libpng> to <libpng-devel-packages>
* Wed Mar 14 2001 ro@suse.de
- added xf86 to neededforbuild
* Tue Mar 06 2001 egger@suse.de
- Initial SuSE version.
openSUSE Build Service is sponsored by