3 %bcond_without tests # do not perform tests
5 Summary: A collection of utilities and DSOs to handle compiled objects
6 Summary(pl.UTF-8): Zestaw narzędzi i bibliotek do obsługi skompilowanych obiektów
10 License: GPL v2+ or LGPL v3+ (libraries), GPL v3+ (programs)
11 Group: Development/Tools
12 Source0: https://fedorahosted.org/releases/e/l/elfutils/%{version}/%{name}-%{version}.tar.bz2
13 # Source0-md5: 1f45a18231c782ccd0966059e2e42ea9
14 Patch0: %{name}-pl.po.patch
15 Patch1: %{name}-debian-manpages.patch
16 Patch2: %{name}-portability.patch
17 Patch3: %{name}-align.patch
18 Patch4: %{name}-paxflags.patch
19 Patch5: %{name}-sparc.patch
20 Patch6: %{name}-inline.patch
21 Patch7: %{name}-scanf.patch
22 Patch8: %{name}-strings_c.patch
23 URL: https://fedorahosted.org/elfutils/
24 BuildRequires: autoconf >= 2.63
25 BuildRequires: automake >= 1:1.8
26 BuildRequires: gcc >= 5:3.4
27 BuildRequires: gettext-tools
28 %ifarch %{x8664} alpha ia64 ppc64 s390x sparc64
29 # PR*FAST{8,16} in <inttypes.h> were broken for 64-bit archs in older versions
30 # also needed for nanosecond timestamps on alpha
31 BuildRequires: glibc-devel >= 6:2.3.4
33 BuildRequires: perl-tools-pod
34 BuildRequires: rpmbuild(macros) >= 1.315
35 BuildRequires: sharutils
36 %if %{with tests} && %(test -d /proc/self ; echo $?)
37 # native test needs proc (for libdwfl -p PID to work)
38 BuildRequires: MOUNTED_PROC
40 Requires: %{name}-libelf = %{version}-%{release}
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 # fails to build with -Wl,-s
44 %define filterout_ld (-Wl,)?-[sS] (-Wl,)?--strip.*
45 %if %{with tests} && 0%(echo %{rpmcflags} | grep -q '\<-g' ; echo $?)
46 # tests require debug symbols
50 %define programprefix eu-
53 Elfutils is a collection of utilities, including ld (a linker), nm
54 (for listing symbols from object files), size (for listing the section
55 sizes of an object or archive file), strip (for discarding symbols),
56 readline (the see the raw ELF file structures), and elflint (to check
57 for well-formed ELF files). Also included are numerous helper
58 libraries which implement DWARF, ELF, and machine-specific ELF
61 %description -l pl.UTF-8
62 Elfutils to zestaw narzędzi, składający się z ld (linkera), nm (do
63 listowania symboli z plików obiektów), size (do listowania rozmiarów
64 sekcji plików obiektów lub archiwów), strip (do usuwania symboli),
65 readline (do oglądania surowych struktur plików ELF) oraz elflint (do
66 sprawdzania poprawności plików ELF). Dołączone są także liczne
67 biblioteki pomocnicze z zaimplementowaną obsługą DWARF, ELF i ELF
68 specyficznych dla architektury.
71 Summary: Development part of libraries to handle compiled objects
72 Summary(pl.UTF-8): Część programistyczna bibliotek do obsługi skompilowanych obiektów
73 Group: Development/Libraries
74 Requires: %{name} = %{version}-%{release}
75 Obsoletes: libelf-devel
78 The elfutils-devel package contains the development part of libraries
79 to create applications for handling compiled objects. libelf allows
80 you to access the internals of the ELF object file format, so you can
81 see the different sections of an ELF file. libebl provides some
82 higher-level ELF access functionality. libdwarf provides access to the
83 DWARF debugging information. libasm provides a programmable assembler
86 %description devel -l pl.UTF-8
87 Pakiet elfutils-devel zawiera część programistyczną bibliotek do
88 tworzenia aplikacji obsługujących skompilowane obiekty. libelf pozwala
89 na dostęp do wnętrzności formatu pliku obiektowego ELF, co pozwala na
90 oglądanie różnych sekcji pliku ELF. libebl udostępnia funkcjonalność
91 dostępu do plików ELF trochę wyższego poziomu. libdwarf pozwala na
92 dostęp do informacji DWARF służących do odpluskwiania. libasm
93 udostępnia programowalny interfejs asemblera.
96 Summary: Library to read and write ELF files
97 Summary(pl.UTF-8): Biblioteki do odczytu i zapisu plików ELF
102 The elfutils-libelf package provides a DSO which allows reading and
103 writing ELF files on a high level. Third party programs depend on this
104 package to read internals of ELF files. The programs of the elfutils
105 package use it also to generate new ELF files.
107 %description libelf -l pl.UTF-8
108 Pakiet elfutils-libelf udostępnia bibliotekę dzieloną, która pozwala
109 na wysokopoziomowe czytanie i zapisywanie plików ELF. Inne programy
110 wymagają tego pakietu, aby odczytywać zawartość plików ELF. Programy z
111 pakietu elfutils używają jej także do generowania nowych plików ELF.
114 Summary: Static libraries to handle compiled objects
115 Summary(pl.UTF-8): Statyczne biblioteki do obsługi skompilowanych obiektów
116 Group: Development/Libraries
117 Requires: %{name}-devel = %{version}-%{release}
118 Obsoletes: libelf-static
121 The elfutils-static package contains the static libraries to create
122 applications for handling compiled objects. libelf allows you to
123 access the internals of the ELF object file format, so you can see the
124 different sections of an ELF file. libebl provides some higher-level
125 ELF access functionality. libdwarf provides access to the DWARF
126 debugging information. libasm provides a programmable assembler
129 %description static -l pl.UTF-8
130 Pakiet elfutils-static zawiera statyczne biblioteki do tworzenia
131 aplikacji obsługujących skompilowane obiekty. libelf pozwala na dostęp
132 do wnętrzności formatu pliku obiektowego ELF, co pozwala na oglądanie
133 różnych sekcji pliku ELF. libebl udostępnia funkcjonalność dostępu do
134 plików ELF trochę wyższego poziomu. libdwarf pozwala na dostęp do
135 informacji DWARF służących do odpluskwiania. libasm udostępnia
136 programowalny interfejs asemblera.
152 # temporarily disable test failing on specific archs
153 # - as for 0.155/binutils-2.23.52.0.1 this fails also on x86
155 %{__perl} -pi -e 's/run-elflint-self.sh//' tests/Makefile.am
166 --program-prefix=%{programprefix}
168 # make check depends on test-nlist not stripped
169 %{__perl} -pi -e 's/^(LDFLAGS =.*)-s/$1/' tests/Makefile
172 %{__make} -C debian/man
175 # some tests rely on English messages
177 %{__make} -C tests check
181 rm -rf $RPM_BUILD_ROOT
182 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,/%{_lib}}
185 DESTDIR=$RPM_BUILD_ROOT
187 install debian/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
189 mv $RPM_BUILD_ROOT%{_libdir}/{libelf-*.so,libelf.so.*} $RPM_BUILD_ROOT/%{_lib}
190 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libelf-*.so) \
191 $RPM_BUILD_ROOT%{_libdir}/libelf.so
196 rm -rf $RPM_BUILD_ROOT
198 %post -p /sbin/ldconfig
199 %postun -p /sbin/ldconfig
201 %post libelf -p /sbin/ldconfig
202 %postun libelf -p /sbin/ldconfig
205 %defattr(644,root,root,755)
206 %doc AUTHORS CONTRIBUTING ChangeLog NEWS NOTES README THANKS TODO
207 %attr(755,root,root) %{_bindir}/eu-*
208 %attr(755,root,root) %{_libdir}/libasm-*.so
209 %attr(755,root,root) %ghost %{_libdir}/libasm.so.1
210 %attr(755,root,root) %{_libdir}/libdw-*.so
211 %attr(755,root,root) %ghost %{_libdir}/libdw.so.1
212 %dir %{_libdir}/elfutils
213 %attr(755,root,root) %{_libdir}/elfutils/lib*.so
214 %{_mandir}/man1/eu-*.1*
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{_libdir}/libasm.so
219 %attr(755,root,root) %{_libdir}/libdw.so
220 %attr(755,root,root) %{_libdir}/libelf.so
222 %{_includedir}/elfutils
223 %{_includedir}/dwarf.h
224 %{_includedir}/gelf.h
225 %{_includedir}/libelf.h
226 %{_includedir}/nlist.h
228 %files libelf -f %{name}.lang
229 %defattr(644,root,root,755)
230 %attr(755,root,root) /%{_lib}/libelf-*.so
231 %attr(755,root,root) %ghost /%{_lib}/libelf.so.1
234 %defattr(644,root,root,755)