Summary(tr.UTF-8): C için bellek hatası ayıklama kitaplığı
Summary(zh_CN.UTF-8): 一种调试器用于检测内存分配错误
Name: ElectricFence
-Version: 2.2.2
-Release: 16
-License: GPL
+Version: 2.2.6
+Release: 1
+License: GPL v2
Group: Development/Debuggers
-Source0: ftp://ftp.perens.com/pub/ElectricFence/Beta/%{name}-%{version}.tar.gz
-# Source0-md5: 56a3cbfdbf65f916988787c789c63e80
-Patch0: %{name}-longjmp.patch
-Patch1: %{name}-no_bash.patch
-Patch2: %{name}-va_arg.patch
-Patch3: %{name}-ac_am.patch
-Patch4: %{name}-pthread.patch
-BuildRequires: autoconf
-BuildRequires: automake
-BuildRequires: libtool
-Obsoletes: libefence0
+Source0: http://ftp.debian.org/debian/pool/main/e/electric-fence/electric-fence_%{version}.tar.gz
+# Source0-md5: b8219270f2010bf1953db3f15cec04a3
+Source1: ef.sh
+Obsoletes: libefence0 < 2.3
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Summary: Static Electric Fence library
Summary(pl.UTF-8): Biblioteka statyczna Electric Fence
Group: Development/Debuggers
-Obsoletes: libefence0-devel
+Obsoletes: libefence0-devel < 2.3
%description static
Static Electric Fence library.
Biblioteka statyczna Electric Fence.
%prep
-%setup -q
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
+%setup -q -c
%build
-%{__libtoolize}
-%{__aclocal}
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-CFLAGS="%{rpmcflags} -DUSE_SEMAPHORE"
-%configure
-%{__make}
+%{__make} -C work \
+ CC="%{__cc}" \
+ CFLAGS="%{rpmcflags} -fPIC -DUSE_SEMAPHORE"
%install
rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_mandir}/man3}
-%{__make} install \
- DESTDIR=$RPM_BUILD_ROOT
-
-%post -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+install %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/ef
+install work/libefence.a $RPM_BUILD_ROOT%{_libdir}
+install work/libefence.so.0.0 $RPM_BUILD_ROOT%{_libdir}
+ln -s libefence.so.0.0 $RPM_BUILD_ROOT%{_libdir}/libefence.so.0
+ln -s libefence.so.0.0 $RPM_BUILD_ROOT%{_libdir}/libefence.so
+cp -p work/libefence.3 $RPM_BUILD_ROOT%{_mandir}/man3
%clean
rm -rf $RPM_BUILD_ROOT
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
%files
%defattr(644,root,root,755)
-%doc README NEWS
+%doc work/{CHANGES,README} work/debian/{README.debian,README.gdb,changelog}
%attr(755,root,root) %{_bindir}/ef
-%attr(755,root,root) %{_libdir}/lib*.so.*.*
-%attr(755,root,root) %{_libdir}/lib*.so
-%{_mandir}/man3/*
+%attr(755,root,root) %{_libdir}/libefence.so.0.0
+%ghost %attr(755,root,root) %{_libdir}/libefence.so.0
+%attr(755,root,root) %{_libdir}/libefence.so
+%{_mandir}/man3/libefence.3*
%files static
%defattr(644,root,root,755)
-%{_libdir}/lib*.a
+%{_libdir}/libefence.a