2 # spec file for package libunwind
4 # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
6 # All modifications and additions to the file contributed by third parties
7 # remain the property of their copyright owners, unless otherwise agreed
8 # upon. The license for this file, and modifications and additions to the
9 # file, is the same license as for the pristine package itself (unless the
10 # license for the pristine package is not an Open Source License, in which
11 # case the license is the MIT License). An "Open Source License" is a
12 # license that conforms to the Open Source Definition (Version 1.9)
13 # published by the Open Source Initiative.
15 # Please submit bugfixes or comments via http://bugs.opensuse.org/
20 BuildRequires: gcc-c++
21 BuildRequires: libtool
22 BuildRequires: pkgconfig
23 Url: http://savannah.nongnu.org/projects/libunwind/
24 Summary: Unwind Library
29 Source0: %{name}-%{version}.tar.gz
30 BuildRoot: %{_tmppath}/%{name}-%{version}-build
31 ExclusiveArch: %ix86 ia64 x86_64 %arm ppc ppc64
33 Patch0: dwarf_order.patch
34 Patch1: x86_accessmem.patch
35 Patch2: dwarf_memleak.patch
36 Patch3: fix_symlink.patch
37 Patch4: fix_builderror.patch
38 Patch5: fix_unwindinfo_free.patch
39 Patch6: disable_UNW_ARM_METHOD_FRAME.patch
42 A portable and efficient C programming interface (API) to determine the
43 call chain of a program.
49 David Mosberger <David.Mosberger@acm.org>
52 Summary: Unwind library
53 Group: Development/Libraries/C and C++
54 Requires: libunwind = %{version}-%{release}
55 Provides: libunwind:%{_libdir}/libunwind.so
58 A portable and efficient C programming interface (API) to determine the
59 call-chain of a program.
65 David Mosberger <davidm@hpl.hp.com>
79 export CFLAGS="-O2 -g -U_FORTIFY_SOURCE "
84 %if ! 0%{?qemu_user_space_build:1}
89 make install DESTDIR=$RPM_BUILD_ROOT
90 rm -f "%buildroot/%_libdir"/*.la
91 mkdir -p $RPM_BUILD_ROOT/%{_lib}
92 mv $RPM_BUILD_ROOT%{_libdir}/libunwind.so.8* $RPM_BUILD_ROOT/%{_lib}
93 ln -sf /%{_lib}/libunwind.so.8 $RPM_BUILD_ROOT%{_libdir}/libunwind.so
94 # Check that ln did not create a dangling link
95 stat "%buildroot"/$(readlink -f "%buildroot/%_libdir/libunwind.so");
97 mkdir -p %{buildroot}/usr/share/license
98 cp COPYING %{buildroot}/usr/share/license/%{name}
99 cat LICENSE >> %{buildroot}/usr/share/license/%{name}
101 %post -p /sbin/ldconfig
103 %postun -p /sbin/ldconfig
106 %defattr(-, root, root)
109 %{_libdir}/libunwind.so
110 /usr/share/license/%{name}
113 %defattr(-, root, root)
116 %{_libdir}/libunwind-*.so
117 %{_libdir}/pkgconfig/libunwind-generic.pc
118 %{_libdir}/pkgconfig/libunwind-ptrace.pc
119 %{_libdir}/pkgconfig/libunwind-setjmp.pc
120 %{_libdir}/pkgconfig/libunwind.pc
121 %ifarch %arm %ix86 x86_64
122 %{_libdir}/pkgconfig/libunwind-coredump.pc
124 %doc %{_mandir}/man?/*