Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > a1324a90f578058005ee88b35ddf90d6 > files > 1

mpatrol-1.4.8-9mdv2009.0.src.rpm

%define libversion 1.4
%define name mpatrol
%define release %mkrel 9
%define version 1.4.8

%define major 1
%define libname %mklibname %{name} %major
%define develname %mklibname %{name} -d

Summary:  A library for controlling and tracing dynamic memory allocations
Name: %{name}
Version: %{version}
Release: %{release}
Source: %{name}_%{version}.tar.bz2
URL: http://www.cbmamiga.demon.co.uk/mpatrol/
License: LGPL
Group: System/Libraries
Requires(post): info-install
Requires(preun): info-install
BuildRequires: binutils-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
The mpatrol library is yet another link library that attempts to
diagnose run-time errors that are caused by the wrong use of
dynamically allocated memory. It acts as a malloc() debugger for
debugging dynamic memory allocations, although it can also trace and
profile calls to malloc() and free() too.

%package -n %{libname}
Summary:  A library for controlling and tracing dynamic memory allocations
Group: System/Libraries

%description -n %{libname}
The mpatrol library is yet another link library that attempts to
diagnose run-time errors that are caused by the wrong use of
dynamically allocated memory. It acts as a malloc() debugger for
debugging dynamic memory allocations, although it can also trace and
profile calls to malloc() and free() too.

%package -n %{develname}
Summary:  A library for controlling and tracing dynamic memory allocations
Group: Development/Other
Requires: %{libname} >= %{version}
Provides: %{name}-devel
Obsoletes: %{mklibname mpatrol 1 -d}

%description -n %{develname}
The mpatrol library is yet another link library that attempts to
diagnose run-time errors that are caused by the wrong use of
dynamically allocated memory. It acts as a malloc() debugger for
debugging dynamic memory allocations, although it can also trace and
profile calls to malloc() and free() too.

%prep
rm -rf $RPM_BUILD_ROOT

%setup -q -n %{name}
touch `find . -type f`

%build
cd build/unix
%make libmpatrol.a libmpatrol.so.%{libversion}
%make libmpatrolmt.a libmpatrolmt.so.%{libversion}
%make libmpalloc.a libmpalloc.so.%{libversion}
%make libmptools.a
%make mpatrol mprof mleak mptrace


%install
%__rm -rf %{buildroot}

%__mv doc/README README.DOC
%__mv man/README README.MAN

#create the dirs
%__mkdir_p %{buildroot}{%{_bindir},%{_libdir},%{_infodir},%{_includedir}/mpatrol}
%__mkdir_p %{buildroot}{%{_mandir}/man{1,3},%{_datadir}/aclocal}

%__install -m755 build/unix/mpatrol %{buildroot}/%{_bindir}
%__install -m755 build/unix/mprof %{buildroot}/%{_bindir}
%__install -m755 build/unix/mptrace %{buildroot}/%{_bindir}
%__install -m755 build/unix/mleak %{buildroot}/%{_bindir}
%__install -m755 bin/mpsym %{buildroot}/%{_bindir}
%__install -m755 bin/mpedit %{buildroot}/%{_bindir}
%__install -m755 bin/hexwords %{buildroot}/%{_bindir}

%__install -m644 src/mpatrol.h %{buildroot}/%{_includedir}
%__install -m644 src/mpalloc.h %{buildroot}/%{_includedir}
%__install -m644 src/mpdebug.h %{buildroot}/%{_includedir}

%__install -m644 tools/*.h %{buildroot}/%{_includedir}/mpatrol
%__install -m644 tools/*.h %{buildroot}/%{_includedir}/mpatrol

%__install -m644 doc/mpatrol.info* %{buildroot}/%{_infodir}

%__install -m755 build/unix/*.so* %{buildroot}/%{_libdir}
%__install -m644 build/unix/*.a* %{buildroot}/%{_libdir}

%__install -m644 man/man1/*.1 %{buildroot}/%{_mandir}/man1
%__install -m644 man/man3/*.3 %{buildroot}/%{_mandir}/man3

%__install -m644 extra/mpatrol.m4 %{buildroot}/%{_datadir}/aclocal

cd %{buildroot}/%{_libdir}

%__ln_s libmpatrol.so.1.4 libmpatrol.so.1
%__ln_s libmpatrol.so.1 libmpatrol.so

%__ln_s libmpatrolmt.so.1.4 libmpatrolmt.so.1
%__ln_s libmpatrolmt.so.1 libmpatrolmt.so

%__ln_s libmpalloc.so.1.4 libmpalloc.so.1
%__ln_s libmpalloc.so.1 libmpalloc.so

#remove unwanted files
rm -rf $RPM_BUILD_ROOT%_libdir/Makefile.aix

%clean
%__rm -rf $RPM_BUILD_ROOT


%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif

%post
%_install_info %{name}.info*

%preun
%_remove_install_info %{name}.info*

%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif


%files
%defattr(-,root,root)
%doc README COPYING COPYING.LIB NEWS ChangeLog
%doc README.DOC README.MAN AUTHORS THANKS
%doc doc/*.ps doc/*.pdf doc/*.txt doc/*.dvi doc/*.tex doc/*.texi
%doc doc/*.html doc/images
%{_bindir}/*
%{_mandir}/man1/*
%{_infodir}/*
%{_datadir}/aclocal/*

%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/*.so.*
%{_mandir}/man3/*

%files -n %{develname}
%defattr(-,root,root)
%{_libdir}/*.a
%{_libdir}/*.so
%{_includedir}/mpalloc.h
%{_includedir}/mpatrol.h
%{_includedir}/mpdebug.h
%{_includedir}/mpatrol


%changelog
* Tue Jul 29 2008 Thierry Vignaud <tvignaud@mandriva.com> 1.4.8-9mdv2009.0
+ Revision: 252953
- rebuild

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Fri Dec 21 2007 Olivier Blin <oblin@mandriva.com> 1.4.8-7mdv2008.1
+ Revision: 136608
- restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request
    - info file must be unregistered before being uninstalled

* Thu Jul 19 2007 Adam Williamson <awilliamson@mandriva.com> 1.4.8-7mdv2008.0
+ Revision: 53438
- rebuild for new era
- new devel policy
- drop lesstif-devel dependency as we don't seem to be building the mptrace GUI support anyway
- spec file clean
- Import mpatrol



* Wed Jul 06 2005 Lenny Cartier <lenny@mandriva.com> 1.4.8-6mdk
- rebuild

* Fri Jun 11 2004 Lenny Cartier <lenny@mandrakesoft.com> 1.4.8-5mdk
- rebuild

* Fri Feb 20 2004 Lenny Cartier <lenny@mandrakesoft.com> 1.4.8-4mdk
- rebuild

* Thu Jan 23 2003 lenny@mandrakesoft.com 1.4.8-3mdk
- rebuild

* Thu Sep 05 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.4.8-2mdk
- rebuild

* Thu May 30 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.4.8-1mdk
- 1.4.8

* Tue Oct 09 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.4.7-2mdk
- add conflicts

* Tue Oct 09 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.4.7-1mdk
- 1.4.7

* Mon Jul 16 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.4.5-1mdk
- fixed & updated by Pierre-Michel Theveny <pmt@mnhn.fr> :
	- update to 1.4.5
	- add soname to shared libs
	- fix CFLAGS for mptrace
	- fix libiberty for --dynamic option

* Mon Mar 26 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.4.3-1mdk
- updated to 1.4.3

* Wed Mar 14 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.4.2-1mdk
- updated to 1.4.2
- split package


* Sun Feb 25 2001 Tim Powers <timp@redhat.com>
- updated to 1.4.0

* Mon Jan  8 2001 Tim Powers <timp@redhat.com>
- updated to 1.3.3

* Thu Dec 21 2000 Tim Powers <timp@redhat.com>
- updated to 1.3.2

* Wed Dec  6 2000 Tim Powers <timp@redhat.com>
- updated to 1.3.1

* Mon Nov 20 2000 Tim Powers <timp@redhat.com>
- forgot to include the info page, added that and the necessary things
  to the post and preun sections
- also forgot to include %%{_includedir}/mpatrol.h, fixed

* Mon Nov 20 2000 Tim Powers <timp@redhat.com>
- updated to 1.3.0
- using build and install process simular to the specfile included in
  the main tarball
- added the docs tarball to the sources

* Tue Oct 24 2000 Tim Powers <timp@redhat.com>
- Initial build for Powertools.