e1e261aa70336a5ad5b4f7eb6369edfc755965f2
[platform/upstream/libunwind.git] / packaging / libunwind.spec
1 %define keepstatic 1
2 %define testsdir %{_libdir}/libunwind
3
4 Name:           libunwind
5 Url:            http://savannah.nongnu.org/projects/libunwind/
6 Summary:        Unwind Library
7 License:        MIT
8 Group:          System/Libraries
9 Version:        1.3.1
10 Release:        0
11 Source:         libunwind-%{version}.tar.gz
12 Source1001:     libunwind.manifest
13 ExclusiveArch:  %ix86 x86_64 %arm aarch64
14
15 BuildRequires:  gcc-c++
16 BuildRequires:  libtool
17 BuildRequires:  pkg-config
18
19 %description
20 A portable and efficient C programming interface (API) to determine the
21 call chain of a program.
22
23 %package devel
24 Summary:        Unwind library
25 Group:          Development/Libraries
26 Requires:       libunwind = %{version}-%{release}
27
28 %description devel
29 A portable and efficient C programming interface (API) to determine the
30 call-chain of a program.
31
32 %package tests
33 Summary:        Package with binaries and data for libunwind tests
34
35 %description tests
36 This package contains installable tests in Bash.
37
38 %prep
39 %setup -q
40 cp %{SOURCE1001} .
41
42 %build
43 %if "%{asan}" == "1"
44 %restore_fcommon
45 %endif
46 autoreconf -fi
47 %configure
48 make %{?_smp_mflags}
49 make -C tests test-ptrace
50
51 %install
52 %make_install
53
54 mkdir -p %{buildroot}%{testsdir}
55 install -m 750 tests/.libs/test-ptrace %{buildroot}%{testsdir}
56 install -m 750 tests/test-ptrace-misc %{buildroot}%{testsdir}
57 install -m 750 tests/run-ptrace-misc %{buildroot}%{testsdir}
58
59 %post -p /sbin/ldconfig
60
61 %postun -p /sbin/ldconfig
62
63 %files
64 %manifest %{name}.manifest
65 %license COPYING
66 %defattr(-, root, root)
67 %{_libdir}/libunwind.so.*
68 %{_libdir}/libunwind-*.so.*
69
70 %files devel
71 %manifest %{name}.manifest
72 %defattr(-, root, root)
73 %{_prefix}/include/*
74 %{_libdir}/libunwind*a
75 %{_libdir}/libunwind*so
76 %{_libdir}/pkgconfig/libunwind-generic.pc
77 %{_libdir}/pkgconfig/libunwind-ptrace.pc
78 %{_libdir}/pkgconfig/libunwind-setjmp.pc
79 %{_libdir}/pkgconfig/libunwind.pc
80 %{_libdir}/pkgconfig/libunwind-coredump.pc
81
82 %changelog
83
84 %files tests
85 %{testsdir}/*