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