Initial import
[platform/upstream/libunwind.git] / packaging / libunwind.spec
1 %define keepstatic 1
2
3 Name:           libunwind
4 BuildRequires:  gcc-c++
5 BuildRequires:  libtool
6 BuildRequires:  pkg-config
7 Url:            http://savannah.nongnu.org/projects/libunwind/
8 Summary:        Unwind Library
9 License:        MIT
10 Group:          System/Libraries
11 Version:        1.1
12 Release:        0
13 VCS:            profile/base/libunwind#upstream/1.1-0-g0349587-dirty
14 Source:         libunwind-%{version}.tar.gz
15 ExclusiveArch:  %ix86 x86_64 %arm 
16
17 %description
18 A portable and efficient C programming interface (API) to determine the
19 call chain of a program.
20
21 %package devel
22 Summary:        Unwind library
23 Group:          Development/Libraries
24 Requires:       libunwind = %{version}-%{release}
25 Provides:       libunwind:%{_libdir}/libunwind.so
26
27 %description devel
28 A portable and efficient C programming interface (API) to determine the
29 call-chain of a program.
30
31 %prep
32 %setup -q
33
34 %build
35 autoreconf -fi
36 export CFLAGS="%optflags -U_FORTIFY_SOURCE"
37 %configure
38 make %{?_smp_mflags}
39
40
41 %install
42 %make_install
43 mkdir -p $RPM_BUILD_ROOT/%{_lib}
44 ln -sf /%{_libdir}/libunwind.so.8 $RPM_BUILD_ROOT%{_libdir}/libunwind.so
45 # Check that ln did not create a dangling link
46 stat "%buildroot"/$(readlink -f "%buildroot/%_libdir/libunwind.so");
47
48 %post -p /sbin/ldconfig
49
50 %postun -p /sbin/ldconfig
51
52 %files
53 %defattr(-, root, root)
54 %_libdir/lib*
55 %{_libdir}/lib*.so.*
56 %{_libdir}/libunwind.so
57
58 %files devel
59 %defattr(-, root, root)
60 %{_prefix}/include/*
61 %{_libdir}/lib*.a
62 %{_libdir}/libunwind-*.so
63 %{_libdir}/pkgconfig/libunwind-generic.pc
64 %{_libdir}/pkgconfig/libunwind-ptrace.pc
65 %{_libdir}/pkgconfig/libunwind-setjmp.pc
66 %{_libdir}/pkgconfig/libunwind.pc
67 %ifarch %arm %ix86 x86_64
68 %{_libdir}/pkgconfig/libunwind-coredump.pc
69 %endif
70 %doc %{_mandir}/man?/*
71
72 %changelog