packaging: bump to 1.6.2
[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.6.2
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 %if "%{hwasan}" == "1"
47 %restore_fcommon
48 %endif
49 autoreconf -fi
50 %configure
51 make %{?_smp_mflags}
52 make -C tests test-ptrace
53
54 %install
55 %make_install
56
57 mkdir -p %{buildroot}%{testsdir}
58 install -m 750 tests/.libs/test-ptrace %{buildroot}%{testsdir}
59 install -m 750 tests/test-ptrace-misc %{buildroot}%{testsdir}
60 install -m 750 tests/run-ptrace-misc %{buildroot}%{testsdir}
61
62 %post -p /sbin/ldconfig
63
64 %postun -p /sbin/ldconfig
65
66 %files
67 %manifest %{name}.manifest
68 %license COPYING
69 %defattr(-, root, root)
70 %{_libdir}/libunwind.so.*
71 %{_libdir}/libunwind-*.so.*
72
73 %files devel
74 %manifest %{name}.manifest
75 %defattr(-, root, root)
76 %{_prefix}/include/*
77 %{_libdir}/libunwind*a
78 %{_libdir}/libunwind*so
79 %{_libdir}/pkgconfig/libunwind-generic.pc
80 %{_libdir}/pkgconfig/libunwind-ptrace.pc
81 %{_libdir}/pkgconfig/libunwind-setjmp.pc
82 %{_libdir}/pkgconfig/libunwind.pc
83 %{_libdir}/pkgconfig/libunwind-coredump.pc
84
85 %changelog
86
87 %files tests
88 %{testsdir}/*