add license file for Tizen SDK
[external/libunwind.git] / packaging / libunwind.spec
1 #
2 # spec file for package libunwind
3 #
4 # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
5 #
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.
14
15 # Please submit bugfixes or comments via http://bugs.opensuse.org/
16 #
17
18
19 Name:           libunwind
20 BuildRequires:  gcc-c++
21 BuildRequires:  libtool
22 BuildRequires:  pkgconfig
23 Url:            http://savannah.nongnu.org/projects/libunwind/
24 Summary:        Unwind Library
25 License:        MIT
26 Group:          System/Base
27 Version:        1.1
28 Release:        0
29 Source0:        %{name}-%{version}.tar.gz
30 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
31 ExclusiveArch:  %ix86 ia64 x86_64 %arm ppc ppc64
32
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
40
41 %description
42 A portable and efficient C programming interface (API) to determine the
43 call chain of a program.
44
45
46
47 Authors:
48 --------
49     David Mosberger <David.Mosberger@acm.org>
50
51 %package devel
52 Summary:        Unwind library
53 Group:          Development/Libraries/C and C++
54 Requires:       libunwind = %{version}-%{release}
55 Provides:       libunwind:%{_libdir}/libunwind.so
56
57 %description devel
58 A portable and efficient C programming interface (API) to determine the
59 call-chain of a program.
60
61
62
63 Authors:
64 --------
65     David Mosberger <davidm@hpl.hp.com>
66
67 %prep
68 %setup -q
69 %patch0 -p1
70 %patch1 -p1
71 %patch2 -p1
72 %patch3 -p1
73 %patch4 -p1
74 %patch5 -p1
75 %patch6 -p1
76
77 %build
78 autoreconf -fi
79 export CFLAGS="-O2 -g -U_FORTIFY_SOURCE "
80 %configure
81 make %{?_smp_mflags}
82
83 %check
84 %if ! 0%{?qemu_user_space_build:1}
85 #make -k check || :
86 %endif
87
88 %install
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");
96
97 mkdir -p %{buildroot}/usr/share/license
98 cp COPYING %{buildroot}/usr/share/license/%{name}
99 cat LICENSE >> %{buildroot}/usr/share/license/%{name}
100
101 %post -p /sbin/ldconfig
102
103 %postun -p /sbin/ldconfig
104
105 %files
106 %defattr(-, root, root)
107 /%_lib/lib*
108 %{_libdir}/lib*.so.*
109 %{_libdir}/libunwind.so
110 /usr/share/license/%{name}
111
112 %files devel
113 %defattr(-, root, root)
114 %{_prefix}/include/*
115 %{_libdir}/lib*.a
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
123 %endif
124 %doc %{_mandir}/man?/*
125
126 %changelog