]> git.pld-linux.org Git - packages/elfutils.git/blobdiff - elfutils.spec
- allocated pointers need 8-byte alignment on sparc (to use ldd/std opcodes to access...
[packages/elfutils.git] / elfutils.spec
index 7fca9bc9d49ec4e7f57c2a0b9230b7e426d16248..c3c862efc1efca6a034902fc6040185fd4d9f919 100644 (file)
@@ -1,27 +1,35 @@
 #
 # Conditional build:
-%bcond_without tests   # do not perform tests
+%bcond_without tests   # do not perform tests
 #
 Summary:       A collection of utilities and DSOs to handle compiled objects
 Summary(pl):   Zestaw narzêdzi i bibliotek do obs³ugi skompilowanych obiektów
 Name:          elfutils
-Version:       0.95
-Release:       1
+Version:       0.108
+Release:       2
 License:       OSL 1.0 (http://www.opensource.org/licenses/osl.php)
 Group:         Development/Tools
 # http://download.fedora.redhat.com/pub/fedora/linux/core/development/i386/SRPMS/
 Source0:       %{name}-%{version}.tar.gz
-# Source0-md5: dc8e8f6af735e90ec7e6a0ca99851bff
+# Source0-md5: fd318a634c8f67c7ac8a975f16965cc3
 Patch0:                %{name}-pl.po.patch
 Patch1:                %{name}-debian-manpages.patch
-Patch2:                %{name}-alpha-stat.patch
+Patch2:                %{name}-portability.patch
+Patch3:                %{name}-bswap.patch
+Patch4:                %{name}-robustify.patch
 #URL:          file://home/devel/drepper
-BuildRequires: autoconf >= 2.54
-BuildRequires: automake >= 1.7
+BuildRequires: autoconf >= 2.59
+BuildRequires: automake >= 1:1.7
 BuildRequires: gcc >= 3.2
 BuildRequires: gettext-devel
+%ifarch %{x8664} alpha ia64 ppc64 s390x sparc64
+# PR*FAST{8,16} in <inttypes.h> were broken for 64-bit archs in older versions
+# also needed for nanosecond timestamps on alpha
+BuildRequires: glibc-devel >= 6:2.3.4
+%endif
 BuildRequires: libltdl-devel
 BuildRequires: perl-tools-pod
+BuildRequires: rpmbuild(macros) >= 1.213
 BuildRequires: sharutils
 Requires:      %{name}-libelf = %{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -118,17 +126,21 @@ programowalny interfejs asemblera.
 %setup -q
 %patch0 -p1
 %patch1 -p1
-# to be removed || updated after switching to glibc 2.3.4
-# (alpha stat64() with nsec fields was added in linux-2.6.4/glibc-2.3.4,
-#  I don't know if elfutils knows how to use it)
 %patch2 -p1
+%patch3 -p1
+%patch4 -p1
 
 %build
-%{__gettextize}
+#%%{__gettextize}
 %{__aclocal}
 %{__autoheader}
 %{__automake}
 %{__autoconf}
+
+# Turn off optimization on sparc to avoid Bus error with some tests
+%ifarch sparc
+CFLAGS="%{rpmcflags} -O0" ; export CFLAGS
+%endif
 %configure \
        --program-prefix=%{_programprefix} \
        --enable-shared
@@ -138,11 +150,16 @@ programowalny interfejs asemblera.
 
 %{__make}
 %{__make} -C debian/man
-%{?with_tests:%{__make} -C tests check}
+%if %{with tests}
+# $ORIGIN used in RPATH needs /proc to work - workaround it using LD_LIBRARY_PATH;
+# ../libelf is needed also to use proper libelf by ../src/elflint during tests
+LD_LIBRARY_PATH=../libasm:../libdw:../libebl:../libelf \
+%{__make} -C tests check
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_mandir}/man1
+install -d $RPM_BUILD_ROOT{%{_mandir}/man1,/%{_lib}}
 
 # *OBJEXT must be passed to workaround problem with messed gettext,
 # which doesn't like *-po dir names
@@ -154,6 +171,10 @@ install -d $RPM_BUILD_ROOT%{_mandir}/man1
 
 install debian/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
 
+mv $RPM_BUILD_ROOT%{_libdir}/libelf-*.so $RPM_BUILD_ROOT/%{_lib}/
+ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib} ; echo libelf-*.so) \
+        $RPM_BUILD_ROOT%{_libdir}/libelf.so
+
 %find_lang libelf
 %find_lang %{name}
 
@@ -178,7 +199,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files devel
 %defattr(644,root,root,755)
-%doc doc/elfutils.sgml
+#%doc doc/elfutils.sgml
 %attr(755,root,root) %{_libdir}/libasm.so
 %attr(755,root,root) %{_libdir}/libdw.so
 %attr(755,root,root) %{_libdir}/libelf.so
@@ -187,7 +208,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files libelf -f libelf.lang
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libelf-*.so
+%attr(755,root,root) /%{_lib}/libelf-*.so
 
 %files static
 %defattr(644,root,root,755)
This page took 0.134147 seconds and 4 git commands to generate.