modify package name for pkgconfig
[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
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
76 %build
77 autoreconf -fi
78 export CFLAGS="-O2 -g -U_FORTIFY_SOURCE "
79 %configure
80 make %{?_smp_mflags}
81
82 %check
83 %if ! 0%{?qemu_user_space_build:1}
84 #make -k check || :
85 %endif
86
87 %install
88 make install DESTDIR=$RPM_BUILD_ROOT
89 rm -f "%buildroot/%_libdir"/*.la
90 mkdir -p $RPM_BUILD_ROOT/%{_lib}
91 mv $RPM_BUILD_ROOT%{_libdir}/libunwind.so.8* $RPM_BUILD_ROOT/%{_lib}
92 ln -sf /%{_lib}/libunwind.so.8 $RPM_BUILD_ROOT%{_libdir}/libunwind.so
93 # Check that ln did not create a dangling link
94 stat "%buildroot"/$(readlink -f "%buildroot/%_libdir/libunwind.so");
95
96 %post -p /sbin/ldconfig
97
98 %postun -p /sbin/ldconfig
99
100 %files
101 %defattr(-, root, root)
102 /%_lib/lib*
103 %{_libdir}/lib*.so.*
104 %{_libdir}/libunwind.so
105
106 %files devel
107 %defattr(-, root, root)
108 %{_prefix}/include/*
109 %{_libdir}/lib*.a
110 %{_libdir}/libunwind-*.so
111 %{_libdir}/pkgconfig/libunwind-generic.pc
112 %{_libdir}/pkgconfig/libunwind-ptrace.pc
113 %{_libdir}/pkgconfig/libunwind-setjmp.pc
114 %{_libdir}/pkgconfig/libunwind.pc
115 %ifarch %arm %ix86 x86_64
116 %{_libdir}/pkgconfig/libunwind-coredump.pc
117 %endif
118 %doc %{_mandir}/man?/*
119
120 %changelog