]>
Commit | Line | Data |
---|---|---|
1ef5b95c JB |
1 | # |
2 | # Conditional build: | |
517b66e9 JP |
3 | %bcond_with tests # perform "make check" (fails randomly) |
4 | %bcond_without doc # man pages | |
5 | %bcond_without static_libs # static libraries | |
1ef5b95c | 6 | # |
4ab0cf1c | 7 | Summary: libunwind - a (mostly) platform-independent unwind API |
bbc714e1 | 8 | Summary(pl.UTF-8): libunwind - (prawie) niezależne od platformy API do rozwijania |
4ab0cf1c | 9 | Name: libunwind |
9660a944 | 10 | Version: 1.6.2 |
f09e4263 | 11 | Release: 2 |
4ab0cf1c JB |
12 | License: MIT |
13 | Group: Libraries | |
2deec1fc | 14 | Source0: https://download.savannah.gnu.org/releases/libunwind/%{name}-%{version}.tar.gz |
9660a944 | 15 | # Source0-md5: f625b6a98ac1976116c71708a73dc44a |
39a6e594 | 16 | Patch0: %{name}-link.patch |
7bb8270b | 17 | Patch1: %{name}-x32.patch |
f4772bfb | 18 | URL: http://www.nongnu.org/libunwind/ |
39a6e594 | 19 | BuildRequires: autoconf >= 2.50 |
1ef5b95c | 20 | BuildRequires: automake >= 1.6 |
0b50d9fc | 21 | %ifarch %{x8664} |
8e766e79 | 22 | BuildRequires: binutils >= 2:2.15.94.0.2.2 |
1d04c85c | 23 | %endif |
b8dc68b8 | 24 | %{?with_doc:BuildRequires: latex2man} |
39a6e594 | 25 | BuildRequires: libtool >= 2:2.0 |
517b66e9 | 26 | BuildRequires: rpmbuild(macros) >= 1.527 |
39a6e594 | 27 | BuildRequires: xz-devel |
112886d5 | 28 | ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 hppa ia64 mips ppc ppc64 sh tilegx |
4ab0cf1c JB |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
1ef5b95c JB |
31 | # some setjmp tricks expect non-redirected functions |
32 | %define filterout_cpp -D_FORTIFY_SOURCE=[0-9]+ | |
33 | ||
da114ef9 JB |
34 | # x86/x86_64/hppa/ia64 |
35 | %ifarch %{ix86} | |
36 | %define asuf x86 | |
37 | %else | |
7bb8270b | 38 | %ifarch %{x8664} x32 |
da114ef9 JB |
39 | %define asuf x86_64 |
40 | %else | |
43e732ec JP |
41 | %ifarch %{arm} |
42 | %define asuf arm | |
43 | %else | |
da114ef9 JB |
44 | %define asuf %{_target_cpu} |
45 | %endif | |
46 | %endif | |
43e732ec | 47 | %endif |
da114ef9 | 48 | |
4ab0cf1c JB |
49 | %description |
50 | The goal of the libunwind project is to define a portable and | |
51 | efficient C programming interface (API) to determine the call-chain | |
52 | of a program. | |
f09e4263 | 53 | |
c79b9939 JR |
54 | %description -l pl.UTF-8 |
55 | Celem projektu libunwind jest zdefiniowanie przenośnego i wydajnego | |
56 | API w języku C do określania łańcucha wywołań w programie. | |
4ab0cf1c JB |
57 | |
58 | %package devel | |
59 | Summary: Header files for libunwind library | |
bbc714e1 | 60 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libunwind |
4ab0cf1c | 61 | Group: Development/Libraries |
f09e4263 JP |
62 | Requires: %{name}%{?_isa} = %{version}-%{release} |
63 | Requires: xz-devel%{?_isa} | |
4ab0cf1c JB |
64 | |
65 | %description devel | |
66 | Header files for libunwind library. | |
67 | ||
c79b9939 JR |
68 | %description devel -l pl.UTF-8 |
69 | Pliki nagłówkowe biblioteki libunwind. | |
4ab0cf1c JB |
70 | |
71 | %package static | |
72 | Summary: Static libunwind library | |
bbc714e1 | 73 | Summary(pl.UTF-8): Statyczna biblioteka libunwind |
4ab0cf1c | 74 | Group: Development/Libraries |
f09e4263 | 75 | Requires: %{name}-devel%{?_isa} = %{version}-%{release} |
4ab0cf1c JB |
76 | |
77 | %description static | |
78 | Static libunwind library. | |
79 | ||
c79b9939 | 80 | %description static -l pl.UTF-8 |
4ab0cf1c JB |
81 | Statyczna biblioteka libunwind. |
82 | ||
83 | %prep | |
84 | %setup -q | |
33dafe23 | 85 | %patch0 -p1 |
7bb8270b | 86 | %patch1 -p1 |
4ab0cf1c JB |
87 | |
88 | %build | |
f4772bfb ŁK |
89 | %{__libtoolize} |
90 | %{__aclocal} | |
91 | %{__autoconf} | |
da114ef9 | 92 | %{__autoheader} |
f4772bfb | 93 | %{__automake} |
1ef5b95c | 94 | # what needs additional -fPIC? libtool already uses it for shared objects |
23e160a1 | 95 | %configure \ |
b8dc68b8 | 96 | CFLAGS="%{rpmcflags} -fPIC" \ |
517b66e9 JP |
97 | %{!?with_doc:--disable-documentation} \ |
98 | %{__enable_disable static_libs static} | |
4ab0cf1c JB |
99 | %{__make} |
100 | ||
23e160a1 AM |
101 | %{?with_tests:%{__make} check} |
102 | ||
4ab0cf1c JB |
103 | %install |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %{__make} install \ | |
107 | DESTDIR=$RPM_BUILD_ROOT | |
108 | ||
109 | %clean | |
110 | rm -rf $RPM_BUILD_ROOT | |
111 | ||
112 | %post -p /sbin/ldconfig | |
113 | %postun -p /sbin/ldconfig | |
114 | ||
115 | %files | |
116 | %defattr(644,root,root,755) | |
117 | %doc AUTHORS COPYING ChangeLog NEWS README TODO | |
da114ef9 | 118 | %attr(755,root,root) %{_libdir}/libunwind.so.*.*.* |
2b3e47c6 | 119 | %attr(755,root,root) %ghost %{_libdir}/libunwind.so.8 |
39a6e594 JB |
120 | %attr(755,root,root) %{_libdir}/libunwind-coredump.so.*.*.* |
121 | %attr(755,root,root) %ghost %{_libdir}/libunwind-coredump.so.0 | |
122 | %attr(755,root,root) %{_libdir}/libunwind-ptrace.so.*.*.* | |
123 | %attr(755,root,root) %ghost %{_libdir}/libunwind-ptrace.so.0 | |
1ef5b95c JB |
124 | %attr(755,root,root) %{_libdir}/libunwind-setjmp.so.*.*.* |
125 | %attr(755,root,root) %ghost %{_libdir}/libunwind-setjmp.so.0 | |
da114ef9 | 126 | %attr(755,root,root) %{_libdir}/libunwind-%{asuf}.so.*.*.* |
2b3e47c6 | 127 | %attr(755,root,root) %ghost %{_libdir}/libunwind-%{asuf}.so.8 |
4ab0cf1c JB |
128 | |
129 | %files devel | |
130 | %defattr(644,root,root,755) | |
da114ef9 | 131 | %attr(755,root,root) %{_libdir}/libunwind.so |
39a6e594 | 132 | %attr(755,root,root) %{_libdir}/libunwind-coredump.so |
da114ef9 | 133 | %attr(755,root,root) %{_libdir}/libunwind-generic.so |
39a6e594 | 134 | %attr(755,root,root) %{_libdir}/libunwind-ptrace.so |
1ef5b95c | 135 | %attr(755,root,root) %{_libdir}/libunwind-setjmp.so |
da114ef9 JB |
136 | %attr(755,root,root) %{_libdir}/libunwind-%{asuf}.so |
137 | %{_libdir}/libunwind.la | |
39a6e594 JB |
138 | %{_libdir}/libunwind-coredump.la |
139 | %{_libdir}/libunwind-ptrace.la | |
1ef5b95c | 140 | %{_libdir}/libunwind-setjmp.la |
da114ef9 | 141 | %{_libdir}/libunwind-%{asuf}.la |
da114ef9 JB |
142 | %{_includedir}/libunwind*.h |
143 | %{_includedir}/unwind.h | |
39a6e594 JB |
144 | %{_pkgconfigdir}/libunwind.pc |
145 | %{_pkgconfigdir}/libunwind-coredump.pc | |
146 | %{_pkgconfigdir}/libunwind-generic.pc | |
147 | %{_pkgconfigdir}/libunwind-ptrace.pc | |
148 | %{_pkgconfigdir}/libunwind-setjmp.pc | |
a2221ab2 | 149 | %if %{with doc} |
da114ef9 JB |
150 | %{_mandir}/man3/_U_dyn_*.3* |
151 | %{_mandir}/man3/libunwind*.3* | |
152 | %{_mandir}/man3/unw_*.3* | |
a2221ab2 | 153 | %endif |
4ab0cf1c | 154 | |
517b66e9 | 155 | %if %{with static_libs} |
4ab0cf1c JB |
156 | %files static |
157 | %defattr(644,root,root,755) | |
da114ef9 | 158 | %{_libdir}/libunwind.a |
39a6e594 | 159 | %{_libdir}/libunwind-coredump.a |
da114ef9 | 160 | %{_libdir}/libunwind-generic.a |
39a6e594 | 161 | %{_libdir}/libunwind-ptrace.a |
1ef5b95c | 162 | %{_libdir}/libunwind-setjmp.a |
da114ef9 | 163 | %{_libdir}/libunwind-%{asuf}.a |
517b66e9 | 164 | %endif |