Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 353a27d9daf11a8fd43ed77be954433a > files > 4

ElectricFence-2.2.2-10mdv2009.0.src.rpm

%define name	ElectricFence
%define version	2.2.2
%define release	%mkrel 10

%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 x86_64
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

%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

%if lib != %{_lib}
# fix the lib path on the Makefile for amd64 (lib -> lib64)
perl -pi -e 's|\(prefix\)/lib|(prefix)/%{_lib}|' Makefile
%endif

%ifarch x86_64
# on x86_64 USE_SEMAPHORE generate an error on sem_init
%make CFLAGS="$RPM_OPT_FLAGS -fPIC"
%else
# (gb) supposedly thread-safe when compiled with USE_SEMAPHORE
%make CFLAGS="$RPM_OPT_FLAGS -DUSE_SEMAPHORE -fPIC"
%endif

%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}/*.so*
echo ".so man3/efence.3" > $RPM_BUILD_ROOT%{_mandir}/man3/libefence.3

%clean
rm -rf $RPM_BUILD_ROOT

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

%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/*.so.*

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



%changelog
* Thu Jul 24 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.2.2-10mdv2009.0
+ Revision: 244679
- rebuild

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

* Thu Mar 13 2008 Andreas Hasenack <andreas@mandriva.com> 2.2.2-8mdv2008.1
+ Revision: 187674
- rebuild for 2008.1

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill prereq on ldconfig on pixel request
    - kill re-definition of %%buildroot on Pixel's request
    - import ElectricFence


* Mon Jun 19 2006 Lenny Cartier <lenny@mandriva.com> 2.2.2-7mdv2007.0
- rebuild

* Sun Jul 17 2005 Couriousous <couriousous@mandriva.org> 2.2.2-6mdk
- From trem <trem@zarb.org>:
	- fix build for amd64

* 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