af314fd4527bee7d85da83e32b81f4bed8c76f36
[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 Source1001:     libunwind.manifest
16 ExclusiveArch:  %ix86 x86_64 %arm aarch64
17
18 %description
19 A portable and efficient C programming interface (API) to determine the
20 call chain of a program.
21
22 %package devel
23 Summary:        Unwind library
24 Group:          Development/Libraries
25 Requires:       libunwind = %{version}-%{release}
26 Provides:       libunwind:%{_libdir}/libunwind.so
27
28 %description devel
29 A portable and efficient C programming interface (API) to determine the
30 call-chain of a program.
31
32 %prep
33 %setup -q
34 cp %{SOURCE1001} .
35
36 %build
37 autoreconf -fi
38 export CFLAGS="%optflags -U_FORTIFY_SOURCE"
39 %configure
40 make %{?_smp_mflags}
41
42
43 %install
44 %make_install
45 mkdir -p $RPM_BUILD_ROOT/%{_lib}
46 ln -sf /%{_libdir}/libunwind.so.8 $RPM_BUILD_ROOT%{_libdir}/libunwind.so
47 # Check that ln did not create a dangling link
48 stat %{buildroot}/$(readlink -f "%{buildroot}/%{_libdir}/libunwind.so");
49
50 %post -p /sbin/ldconfig
51
52 %postun -p /sbin/ldconfig
53
54 %files
55 %manifest %{name}.manifest
56 %license COPYING
57 %defattr(-, root, root)
58 %_libdir/lib*
59 %{_libdir}/lib*.so.*
60 %{_libdir}/libunwind.so
61
62 %files devel
63 %manifest %{name}.manifest
64 %defattr(-, root, root)
65 %{_prefix}/include/*
66 %{_libdir}/lib*.a
67 %{_libdir}/libunwind-*.so
68 %{_libdir}/pkgconfig/libunwind-generic.pc
69 %{_libdir}/pkgconfig/libunwind-ptrace.pc
70 %{_libdir}/pkgconfig/libunwind-setjmp.pc
71 %{_libdir}/pkgconfig/libunwind.pc
72 %ifarch %arm %ix86 x86_64 aarch64
73 %{_libdir}/pkgconfig/libunwind-coredump.pc
74 %endif
75 %doc %{_mandir}/man?/*
76
77 %changelog