]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - package debuginfod.service | |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_without debuginfod # debuginfod server and client | |
6 | %bcond_without tests # do not perform tests | |
7 | # | |
8 | Summary: A collection of utilities and DSOs to handle compiled objects | |
9 | Summary(pl.UTF-8): Zestaw narzędzi i bibliotek do obsługi skompilowanych obiektów | |
10 | Name: elfutils | |
11 | Version: 0.188 | |
12 | Release: 2 | |
13 | License: GPL v2+ or LGPL v3+ (libraries), GPL v3+ (programs) | |
14 | Group: Development/Tools | |
15 | Source0: https://sourceware.org/elfutils/ftp/%{version}/%{name}-%{version}.tar.bz2 | |
16 | # Source0-md5: efb25a91873b2eec4df9f31e6a4f4e5c | |
17 | Patch0: %{name}-pl.po.patch | |
18 | Patch1: %{name}-debian-manpages.patch | |
19 | Patch2: %{name}-awk.patch | |
20 | Patch3: %{name}-align.patch | |
21 | Patch4: %{name}-paxflags.patch | |
22 | Patch5: %{name}-sparc.patch | |
23 | Patch6: disable-tests.patch | |
24 | URL: https://sourceware.org/elfutils/ | |
25 | BuildRequires: autoconf >= 2.63 | |
26 | BuildRequires: automake >= 1:1.11 | |
27 | %{?with_tests:BuildRequires: bsdtar} | |
28 | BuildRequires: bzip2-devel | |
29 | BuildRequires: gawk | |
30 | BuildRequires: gcc >= 6:4.3 | |
31 | BuildRequires: gettext-tools >= 0.19.6 | |
32 | BuildRequires: glibc-devel >= 6:2.7 | |
33 | BuildRequires: libstdc++-devel >= 6:4.7 | |
34 | BuildRequires: perl-tools-pod | |
35 | BuildRequires: rpmbuild(macros) >= 1.527 | |
36 | BuildRequires: sharutils | |
37 | BuildRequires: xz-devel | |
38 | BuildRequires: zlib-devel | |
39 | BuildRequires: zstd-devel | |
40 | %if %{with tests} && %(test -d /proc/self ; echo $?) | |
41 | # native test needs proc (for libdwfl -p PID to work) | |
42 | BuildRequires: MOUNTED_PROC | |
43 | %endif | |
44 | %if %{with debuginfod} | |
45 | BuildRequires: curl-devel >= 7.29.0 | |
46 | BuildRequires: libarchive-devel >= 3.1.2 | |
47 | BuildRequires: libmicrohttpd-devel >= 0.9.33 | |
48 | BuildRequires: sqlite3-devel >= 3.7.17 | |
49 | %endif | |
50 | Requires: %{name}-libelf = %{version}-%{release} | |
51 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
52 | ||
53 | # fails to build with -Wl,-s | |
54 | %define filterout_ld (-Wl,)?-[sS] (-Wl,)?--strip.* | |
55 | %if %{with tests} && 0%(echo %{rpmcflags} | grep -q '\<-g' ; echo $?) | |
56 | # tests require debug symbols | |
57 | %define specflags -g | |
58 | %endif | |
59 | ||
60 | %define programprefix eu- | |
61 | ||
62 | %description | |
63 | Elfutils is a collection of utilities, including ld (a linker), nm | |
64 | (for listing symbols from object files), size (for listing the section | |
65 | sizes of an object or archive file), strip (for discarding symbols), | |
66 | readline (the see the raw ELF file structures), and elflint (to check | |
67 | for well-formed ELF files). Also included are numerous helper | |
68 | libraries which implement DWARF, ELF, and machine-specific ELF | |
69 | handling. | |
70 | ||
71 | %description -l pl.UTF-8 | |
72 | Elfutils to zestaw narzędzi, składający się z ld (linkera), nm (do | |
73 | listowania symboli z plików obiektów), size (do listowania rozmiarów | |
74 | sekcji plików obiektów lub archiwów), strip (do usuwania symboli), | |
75 | readline (do oglądania surowych struktur plików ELF) oraz elflint (do | |
76 | sprawdzania poprawności plików ELF). Dołączone są także liczne | |
77 | biblioteki pomocnicze z zaimplementowaną obsługą DWARF, ELF i ELF | |
78 | specyficznych dla architektury. | |
79 | ||
80 | %package devel | |
81 | Summary: Development part of libraries to handle compiled objects | |
82 | Summary(pl.UTF-8): Część programistyczna bibliotek do obsługi skompilowanych obiektów | |
83 | Group: Development/Libraries | |
84 | Requires: %{name} = %{version}-%{release} | |
85 | Requires: bzip2-devel | |
86 | Requires: xz-devel | |
87 | Requires: zlib-devel | |
88 | Obsoletes: libelf-devel < 0.8.14 | |
89 | Obsoletes: libelf0-devel < 0.8.14 | |
90 | ||
91 | %description devel | |
92 | The elfutils-devel package contains the development part of libraries | |
93 | to create applications for handling compiled objects. libelf allows | |
94 | you to access the internals of the ELF object file format, so you can | |
95 | see the different sections of an ELF file. libdw provides access to | |
96 | the DWARF debugging information. libasm provides a programmable | |
97 | assembler interface. | |
98 | ||
99 | %description devel -l pl.UTF-8 | |
100 | Pakiet elfutils-devel zawiera część programistyczną bibliotek do | |
101 | tworzenia aplikacji obsługujących skompilowane obiekty. libelf pozwala | |
102 | na dostęp do wnętrzności formatu pliku obiektowego ELF, co pozwala na | |
103 | oglądanie różnych sekcji pliku ELF. libdw pozwala na dostęp do | |
104 | informacji DWARF służących do odpluskwiania. libasm udostępnia | |
105 | programowalny interfejs asemblera. | |
106 | ||
107 | %package libelf | |
108 | Summary: Library to read and write ELF files | |
109 | Summary(pl.UTF-8): Biblioteki do odczytu i zapisu plików ELF | |
110 | Group: Libraries | |
111 | #Obsoletes: libelf | |
112 | ||
113 | %description libelf | |
114 | The elfutils-libelf package provides a DSO which allows reading and | |
115 | writing ELF files on a high level. Third party programs depend on this | |
116 | package to read internals of ELF files. The programs of the elfutils | |
117 | package use it also to generate new ELF files. | |
118 | ||
119 | %description libelf -l pl.UTF-8 | |
120 | Pakiet elfutils-libelf udostępnia bibliotekę dzieloną, która pozwala | |
121 | na wysokopoziomowe czytanie i zapisywanie plików ELF. Inne programy | |
122 | wymagają tego pakietu, aby odczytywać zawartość plików ELF. Programy z | |
123 | pakietu elfutils używają jej także do generowania nowych plików ELF. | |
124 | ||
125 | %package static | |
126 | Summary: Static libraries to handle compiled objects | |
127 | Summary(pl.UTF-8): Statyczne biblioteki do obsługi skompilowanych obiektów | |
128 | Group: Development/Libraries | |
129 | Requires: %{name}-devel = %{version}-%{release} | |
130 | Obsoletes: libelf-static < 0.8.14 | |
131 | ||
132 | %description static | |
133 | The elfutils-static package contains the static libraries to create | |
134 | applications for handling compiled objects. libelf allows you to | |
135 | access the internals of the ELF object file format, so you can see the | |
136 | different sections of an ELF file. libdw provides access to the DWARF | |
137 | debugging information. libasm provides a programmable assembler | |
138 | interface. | |
139 | ||
140 | %description static -l pl.UTF-8 | |
141 | Pakiet elfutils-static zawiera statyczne biblioteki do tworzenia | |
142 | aplikacji obsługujących skompilowane obiekty. libelf pozwala na dostęp | |
143 | do wnętrzności formatu pliku obiektowego ELF, co pozwala na oglądanie | |
144 | różnych sekcji pliku ELF. libdw pozwala na dostęp do informacji DWARF | |
145 | służących do odpluskwiania. libasm udostępnia programowalny interfejs | |
146 | asemblera. | |
147 | ||
148 | %package debuginfod | |
149 | Summary: debuginfod server and client | |
150 | Summary(pl.UTF-8): Serwer i klient debuginfod | |
151 | Group: Libraries | |
152 | Requires: %{name} = %{version}-%{release} | |
153 | Requires: %{name}-debuginfod-libs = %{version}-%{release} | |
154 | Requires: libarchive >= 3.1.2 | |
155 | Requires: libmicrohttpd >= 0.9.33 | |
156 | Requires: sqlite3 >= 3.7.17 | |
157 | ||
158 | %description debuginfod | |
159 | debuginfod server and client. | |
160 | ||
161 | %description debuginfod -l pl.UTF-8 | |
162 | Serwer i klient debuginfod. | |
163 | ||
164 | %package debuginfod-libs | |
165 | Summary: debuginfod library | |
166 | Summary(pl.UTF-8): Biblioteka debuginfod | |
167 | Group: Libraries | |
168 | Requires: %{name}-libelf = %{version}-%{release} | |
169 | Requires: curl-libs >= 7.29.0 | |
170 | Conflicts: elfutils-debuginfod < 0.187-3 | |
171 | ||
172 | %description debuginfod-libs | |
173 | debuginfod library. | |
174 | ||
175 | %description debuginfod-libs -l pl.UTF-8 | |
176 | Biblioteka debuginfod. | |
177 | ||
178 | %package debuginfod-devel | |
179 | Summary: Header file for debuginfod library | |
180 | Summary(pl.UTF-8): Plik nagłówkowy biblioteki debuginfod | |
181 | Group: Development/Libraries | |
182 | Requires: %{name}-debuginfod-libs = %{version}-%{release} | |
183 | Requires: %{name}-devel = %{version}-%{release} | |
184 | ||
185 | %description debuginfod-devel | |
186 | Header file for debuginfod library. | |
187 | ||
188 | %description debuginfod-devel -l pl.UTF-8 | |
189 | Plik nagłówkowy biblioteki debuginfod. | |
190 | ||
191 | %prep | |
192 | %setup -q | |
193 | %patch0 -p1 | |
194 | %patch1 -p1 | |
195 | %patch2 -p1 | |
196 | %patch3 -p1 | |
197 | %patch4 -p1 | |
198 | %patch5 -p1 | |
199 | %patch6 -p1 | |
200 | ||
201 | %{__rm} po/stamp-po | |
202 | ||
203 | # temporarily disable failing tests (depending on arch) | |
204 | %ifarch x32 | |
205 | %{__sed} -i -e 's/run-backtrace-native-biarch.sh//' tests/Makefile.am | |
206 | %endif | |
207 | ||
208 | # make sure this is not even tried on arch it has no chance to run | |
209 | %ifarch %{ix86} | |
210 | %{__sed} -i -e 's/run-disasm-x86-64.sh//' tests/Makefile.am | |
211 | %endif | |
212 | ||
213 | %build | |
214 | #%%{__gettextize} | |
215 | %{__aclocal} -I m4 | |
216 | %{__autoconf} | |
217 | %{__autoheader} | |
218 | %{__automake} | |
219 | %configure \ | |
220 | --disable-silent-rules \ | |
221 | %{__enable_disable debuginfod} \ | |
222 | --program-prefix=%{programprefix} | |
223 | ||
224 | # make check depends on test-nlist not stripped | |
225 | %{__perl} -pi -e 's/^(LDFLAGS =.*)-s/$1/' tests/Makefile | |
226 | ||
227 | %{__make} | |
228 | %{__make} -C debian/man | |
229 | ||
230 | %if %{with tests} | |
231 | # some tests rely on English messages | |
232 | LC_ALL=C \ | |
233 | %{__make} -C tests check | |
234 | %endif | |
235 | ||
236 | %install | |
237 | rm -rf $RPM_BUILD_ROOT | |
238 | install -d $RPM_BUILD_ROOT{%{_mandir}/man1,/%{_lib}} | |
239 | ||
240 | %{__make} install \ | |
241 | DESTDIR=$RPM_BUILD_ROOT | |
242 | ||
243 | install debian/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
244 | ||
245 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/{libelf-*.so,libelf.so.*} $RPM_BUILD_ROOT/%{_lib} | |
246 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libelf-*.so) \ | |
247 | $RPM_BUILD_ROOT%{_libdir}/libelf.so | |
248 | ||
249 | %find_lang %{name} | |
250 | ||
251 | %clean | |
252 | rm -rf $RPM_BUILD_ROOT | |
253 | ||
254 | %post -p /sbin/ldconfig | |
255 | %postun -p /sbin/ldconfig | |
256 | ||
257 | %post libelf -p /sbin/ldconfig | |
258 | %postun libelf -p /sbin/ldconfig | |
259 | ||
260 | %post debuginfod-libs -p /sbin/ldconfig | |
261 | %postun debuginfod-libs -p /sbin/ldconfig | |
262 | ||
263 | %files | |
264 | %defattr(644,root,root,755) | |
265 | %doc AUTHORS CONTRIBUTING ChangeLog NEWS NOTES README THANKS TODO | |
266 | %attr(755,root,root) %{_bindir}/eu-* | |
267 | %attr(755,root,root) %{_libdir}/libasm-*.so | |
268 | %attr(755,root,root) %ghost %{_libdir}/libasm.so.1 | |
269 | %attr(755,root,root) %{_libdir}/libdw-*.so | |
270 | %attr(755,root,root) %ghost %{_libdir}/libdw.so.1 | |
271 | %{_mandir}/man1/eu-*.1* | |
272 | ||
273 | %files devel | |
274 | %defattr(644,root,root,755) | |
275 | %attr(755,root,root) %{_libdir}/libasm.so | |
276 | %attr(755,root,root) %{_libdir}/libdw.so | |
277 | %attr(755,root,root) %{_libdir}/libelf.so | |
278 | %{_includedir}/dwarf.h | |
279 | %{_includedir}/gelf.h | |
280 | %{_includedir}/libelf.h | |
281 | %{_includedir}/nlist.h | |
282 | %dir %{_includedir}/elfutils | |
283 | %{_includedir}/elfutils/elf-knowledge.h | |
284 | %{_includedir}/elfutils/known-dwarf.h | |
285 | %{_includedir}/elfutils/libasm.h | |
286 | %{_includedir}/elfutils/libdw.h | |
287 | %{_includedir}/elfutils/libdwelf.h | |
288 | %{_includedir}/elfutils/libdwfl.h | |
289 | %{_includedir}/elfutils/version.h | |
290 | %{_pkgconfigdir}/libdw.pc | |
291 | %{_pkgconfigdir}/libelf.pc | |
292 | %{_mandir}/man3/elf_begin.3* | |
293 | %{_mandir}/man3/elf_clone.3* | |
294 | %{_mandir}/man3/elf_getdata.3* | |
295 | %{_mandir}/man3/elf_update.3* | |
296 | ||
297 | %files libelf -f %{name}.lang | |
298 | %defattr(644,root,root,755) | |
299 | %attr(755,root,root) /%{_lib}/libelf-*.so | |
300 | %attr(755,root,root) %ghost /%{_lib}/libelf.so.1 | |
301 | ||
302 | %files static | |
303 | %defattr(644,root,root,755) | |
304 | %{_libdir}/libasm.a | |
305 | %{_libdir}/libdw.a | |
306 | %{_libdir}/libelf.a | |
307 | ||
308 | %if %{with debuginfod} | |
309 | %files debuginfod | |
310 | %defattr(644,root,root,755) | |
311 | %attr(755,root,root) %{_bindir}/debuginfod | |
312 | %attr(755,root,root) %{_bindir}/debuginfod-find | |
313 | %{_mandir}/man1/debuginfod-find.1* | |
314 | %{_mandir}/man7/debuginfod-client-config.7* | |
315 | %{_mandir}/man8/debuginfod.8* | |
316 | # uncomment after packaging debuginfod.service | |
317 | #%{_mandir}/man8/debuginfod.service.8* | |
318 | %attr(755,root,root) /etc/profile.d/debuginfod.sh | |
319 | %attr(755,root,root) /etc/profile.d/debuginfod.csh | |
320 | ||
321 | %files debuginfod-libs | |
322 | %defattr(644,root,root,755) | |
323 | %attr(755,root,root) %{_libdir}/libdebuginfod-*.so | |
324 | %attr(755,root,root) %ghost %{_libdir}/libdebuginfod.so.1 | |
325 | ||
326 | %files debuginfod-devel | |
327 | %defattr(644,root,root,755) | |
328 | %attr(755,root,root) %{_libdir}/libdebuginfod.so | |
329 | %{_includedir}/elfutils/debuginfod.h | |
330 | %{_pkgconfigdir}/libdebuginfod.pc | |
331 | %{_mandir}/man3/debuginfod_*.3* | |
332 | %endif |