Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > dadeaee7498c6d346bab518aaeb182ca > files > 4

ElectricFence-2.2.2-5mdk.src.rpm

%define name	ElectricFence
%define version	2.2.2
%define release	5mdk

%define lib_major	0
%define lib_name_orig	%mklibname efence
%define lib_name	%mklibname efence %{lib_major}


Summary:	A debugger which detects memory allocation violations
Name:		%{name}
Version:	%{version}
Release:	%{release}
ExclusiveArch:	%{ix86} sparc ppc
License:	GPL
Group:		Development/Other
Source:		ftp://ftp.ecrc.net/pub/netsw/System/Libs/Memory/Debug/%{name}-%{version}.tar.bz2
URL:		http://perens.com/FreeSoftware/
Patch1:		ElectricFence-2.0.5-longjmp.patch.bz2
Patch2:		ElectricFence-2.1-va_arg.patch.bz2
Requires:	%{lib_name} = %{version}
Requires:	%{lib_name}-devel = %{version}
BuildRoot:	%{_tmppath}/%{name}-%{version}-buildroot

%package -n %{lib_name}
Summary:	Shared Libraries for Electric Fence %{version}
Group:		System/Libraries
PreReq:		/sbin/ldconfig

%package -n %{lib_name}-devel
Summary:	Static library for Electric Fence %{version}
Group:		Development/C
Requires:	%{lib_name} = %{version}
Provides:	%{lib_name_orig}-devel = %{version}-%{release}
Provides:	%{name}-devel = %{version}-%{release}

%description
If you know what malloc() violations are, you'll be interested in
ElectricFence. ElectricFence is a tool which can be used for C
programming and debugging. It uses the virtual memory hardware of your
system to detect when software overruns malloc() buffer boundaries,
and/or to detect any accesses of memory released by
free(). ElectricFence will then stop the program on the first
instruction that caused a bounds violation and you can use your
favorite debugger to display the offending statement.

This package will install ElectricFence, which you can use if you're
searching for a debugger to find malloc() violations.

%description -n %{lib_name}
This package contains Electric Fence shared object library. Electric
Fence is a debugger which detects memory allocation violations.

%description -n %{lib_name}-devel
This package contains the static library for Electric Fence %{version}.

%prep
%setup -q
%patch1 -p1 -b .longjmp
%patch2 -p1 -b .vaarg

%build
# (gb) supposedly thread-safe when compiled with USE_SEMAPHORE
%make CFLAGS="$RPM_OPT_FLAGS -DUSE_SEMAPHORE -fPIC"

%install
rm -rf $RPM_BUILD_ROOT

install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
install -d -m 755 $RPM_BUILD_ROOT%{_libdir}
install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man3

%makeinstall MAN_INSTALL_DIR=$RPM_BUILD_ROOT%{_mandir}/man3
chmod a+x $RPM_BUILD_ROOT%{_libdir}/libefence.so*
echo ".so man3/efence.3" > $RPM_BUILD_ROOT%{_mandir}/man3/libefence.3

%clean
rm -rf $RPM_BUILD_ROOT

%post -n %{lib_name} -p /sbin/ldconfig
%postun -n %{lib_name} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc README COPYING
%_mandir/man3/efence.3*
%_mandir/man3/libefence.3*
%_bindir/ef

%files -n %{lib_name}
%defattr(-,root,root)
%doc CHANGES
%_libdir/libefence.so.0
%_libdir/libefence.so.0.0

%files -n %{lib_name}-devel
%defattr(-,root,root)
%_libdir/libefence.a
%_libdir/libefence.so

%changelog
* Mon Jan 24 2005 Olivier Thauvin <thauvin@aerov.jussieu.fr> 2.2.2-5mdk
- move man page from -devel to main package because:
   - no requires on main package, so it's broken
   - applying policy

* Thu Jan 16 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.2.2-4mdk
- Rebuild, use mklibname

* Thu Dec  6 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.2.2-3mdk
- Libification thus rpmlint fixing

* Tue Apr 10 2001 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.2.2-2mdk
- sanitized specfile (s/Copyright/License, etc.)
- added -DUSE_SEMAPHORE to compile options. This is supposed to make
  ElectricFence thread-safe

* Sat Dec 23 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.2.2-1mdk
- new and shiny source.
- fix the build on x86 architecture.

* Fri Jul 21 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.2.0-11mdk
- BM, macros, _spechelper_

* Mon Apr 17 2000 Christopher Molnarc <molnarc@mandrakesoft.com> 2.2.0-10mdk
- new post and postun sections, call ldconfig
- split into ElectricFence and ElectricFence-devel

* Tue Apr 11 2000 Christopher Molnarc <molnarc@mandrakesoft.com> 2.2.0-9mdk
- new group Development/Other

* Wed Apr  5 2000 Jeff Garzik <jgarzik@mandrakesoft.com> 2.2.0-8mdk
- updated BuildRoot
- new group Development/Debuggers

* Sun Mar 19 2000 John Buswell <johnb@mandrakesoft.com> 2.2.0-7mdk
- Added va patch for PPC

* Fri Jan 21 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.2.0-6mdk
- don't use broken Excludearch but use Exclusivearch to exclude alpha.

* Fri Nov 26 1999 Axalon Bloodstone <axalon@linux-mandrake.com>
- fix lib perms

* Thu Oct  7 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Rewrite the spec to be usuable (#279).

* Sat Jul 17 1999 Bernhard Rosenkraenzer <bero@mandrakesoft.de>
- 2.2.0

* Sun Jul  4 1999 Axalon Bloodstone <axalon@linux-mandrake.com>
- bzip2 manpage

* Tue May 04 1999 Bernhard Rosenkraenzer <bero@mandrakesoft.com>
- Mandrake adaptions
- handle RPM_OPT_FLAGS
- add de locale

* Sat Apr 10 1999 Matt Wilson <msw@redhat.com>
- version 2.1

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 13)

* Wed Jan 06 1999 Cristian Gafton <gafton@redhat.com>
- build for glibc 2.1

* Fri Aug 21 1998 Jeff Johnson <jbj@redhat.com>
- create efence.3 (problem #830)

* Tue Aug  4 1998 Jeff Johnson <jbj@redhat.com>
- build root

* Mon Jun 01 1998 Prospector System <bugs@redhat.com>
- translations modified for de

* Mon Jun 01 1998 Prospector System <bugs@redhat.com>
- need to use sigsetjmp() and siglongjmp() for proper testing

* Fri May 01 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Thu Apr 30 1998 Cristian Gafton <gafton@redhat.com>
- use ExcludeArch instead of Exclude

* Thu Jul 10 1997 Erik Troan <ewt@redhat.com>
- built against glibc