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: 2e4536c1c48034f188a80789a59114d8
14 Patch0: %{name}-pl.po.patch
15 Patch1: %{name}-debian-manpages.patch
16 Patch2: %{name}-awk.patch
17 Patch3: %{name}-align.patch
18 Patch4: %{name}-paxflags.patch
19 Patch5: %{name}-sparc.patch
20 Patch6: %{name}-inline.patch
22 URL: https://fedorahosted.org/elfutils/
23 BuildRequires: autoconf >= 2.63
24 BuildRequires: automake >= 1:1.8
26 BuildRequires: gcc >= 6:4.3
27 BuildRequires: gettext-tools
28 BuildRequires: glibc-devel >= 6:2.7
29 BuildRequires: perl-tools-pod
30 BuildRequires: rpmbuild(macros) >= 1.315
31 BuildRequires: sharutils
32 %if %{with tests} && %(test -d /proc/self ; echo $?)
33 # native test needs proc (for libdwfl -p PID to work)
34 BuildRequires: MOUNTED_PROC
36 Requires: %{name}-libelf = %{version}-%{release}
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 # fails to build with -Wl,-s
40 %define filterout_ld (-Wl,)?-[sS] (-Wl,)?--strip.*
41 %if %{with tests} && 0%(echo %{rpmcflags} | grep -q '\<-g' ; echo $?)
42 # tests require debug symbols
46 %define programprefix eu-
49 Elfutils is a collection of utilities, including ld (a linker), nm
50 (for listing symbols from object files), size (for listing the section
51 sizes of an object or archive file), strip (for discarding symbols),
52 readline (the see the raw ELF file structures), and elflint (to check
53 for well-formed ELF files). Also included are numerous helper
54 libraries which implement DWARF, ELF, and machine-specific ELF
57 %description -l pl.UTF-8
58 Elfutils to zestaw narzędzi, składający się z ld (linkera), nm (do
59 listowania symboli z plików obiektów), size (do listowania rozmiarów
60 sekcji plików obiektów lub archiwów), strip (do usuwania symboli),
61 readline (do oglądania surowych struktur plików ELF) oraz elflint (do
62 sprawdzania poprawności plików ELF). Dołączone są także liczne
63 biblioteki pomocnicze z zaimplementowaną obsługą DWARF, ELF i ELF
64 specyficznych dla architektury.
67 Summary: Development part of libraries to handle compiled objects
68 Summary(pl.UTF-8): Część programistyczna bibliotek do obsługi skompilowanych obiektów
69 Group: Development/Libraries
70 Requires: %{name} = %{version}-%{release}
71 Obsoletes: libelf-devel
74 The elfutils-devel package contains the development part of libraries
75 to create applications for handling compiled objects. libelf allows
76 you to access the internals of the ELF object file format, so you can
77 see the different sections of an ELF file. libebl provides some
78 higher-level ELF access functionality. libdwarf provides access to the
79 DWARF debugging information. libasm provides a programmable assembler
82 %description devel -l pl.UTF-8
83 Pakiet elfutils-devel zawiera część programistyczną bibliotek do
84 tworzenia aplikacji obsługujących skompilowane obiekty. libelf pozwala
85 na dostęp do wnętrzności formatu pliku obiektowego ELF, co pozwala na
86 oglądanie różnych sekcji pliku ELF. libebl udostępnia funkcjonalność
87 dostępu do plików ELF trochę wyższego poziomu. libdwarf pozwala na
88 dostęp do informacji DWARF służących do odpluskwiania. libasm
89 udostępnia programowalny interfejs asemblera.
92 Summary: Library to read and write ELF files
93 Summary(pl.UTF-8): Biblioteki do odczytu i zapisu plików ELF
98 The elfutils-libelf package provides a DSO which allows reading and
99 writing ELF files on a high level. Third party programs depend on this
100 package to read internals of ELF files. The programs of the elfutils
101 package use it also to generate new ELF files.
103 %description libelf -l pl.UTF-8
104 Pakiet elfutils-libelf udostępnia bibliotekę dzieloną, która pozwala
105 na wysokopoziomowe czytanie i zapisywanie plików ELF. Inne programy
106 wymagają tego pakietu, aby odczytywać zawartość plików ELF. Programy z
107 pakietu elfutils używają jej także do generowania nowych plików ELF.
110 Summary: Static libraries to handle compiled objects
111 Summary(pl.UTF-8): Statyczne biblioteki do obsługi skompilowanych obiektów
112 Group: Development/Libraries
113 Requires: %{name}-devel = %{version}-%{release}
114 Obsoletes: libelf-static
117 The elfutils-static package contains the static libraries to create
118 applications for handling compiled objects. libelf allows you to
119 access the internals of the ELF object file format, so you can see the
120 different sections of an ELF file. libebl provides some higher-level
121 ELF access functionality. libdwarf provides access to the DWARF
122 debugging information. libasm provides a programmable assembler
125 %description static -l pl.UTF-8
126 Pakiet elfutils-static zawiera statyczne biblioteki do tworzenia
127 aplikacji obsługujących skompilowane obiekty. libelf pozwala na dostęp
128 do wnętrzności formatu pliku obiektowego ELF, co pozwala na oglądanie
129 różnych sekcji pliku ELF. libebl udostępnia funkcjonalność dostępu do
130 plików ELF trochę wyższego poziomu. libdwarf pozwala na dostęp do
131 informacji DWARF służących do odpluskwiania. libasm udostępnia
132 programowalny interfejs asemblera.
149 # temporarily disable failing tests (depending or arch)
150 #%{__sed} -i -e 's/run-elflint-self.sh//' tests/Makefile.am
159 --disable-silent-rules \
161 --program-prefix=%{programprefix}
163 # make check depends on test-nlist not stripped
164 %{__perl} -pi -e 's/^(LDFLAGS =.*)-s/$1/' tests/Makefile
167 %{__make} -C debian/man
170 # some tests rely on English messages
172 %{__make} -C tests check
176 rm -rf $RPM_BUILD_ROOT
177 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,/%{_lib}}
180 DESTDIR=$RPM_BUILD_ROOT
182 install debian/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
184 %{__mv} $RPM_BUILD_ROOT%{_libdir}/{libelf-*.so,libelf.so.*} $RPM_BUILD_ROOT/%{_lib}
185 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libelf-*.so) \
186 $RPM_BUILD_ROOT%{_libdir}/libelf.so
191 rm -rf $RPM_BUILD_ROOT
193 %post -p /sbin/ldconfig
194 %postun -p /sbin/ldconfig
196 %post libelf -p /sbin/ldconfig
197 %postun libelf -p /sbin/ldconfig
200 %defattr(644,root,root,755)
201 %doc AUTHORS CONTRIBUTING ChangeLog NEWS NOTES README THANKS TODO
202 %attr(755,root,root) %{_bindir}/eu-*
203 %attr(755,root,root) %{_libdir}/libasm-*.so
204 %attr(755,root,root) %ghost %{_libdir}/libasm.so.1
205 %attr(755,root,root) %{_libdir}/libdw-*.so
206 %attr(755,root,root) %ghost %{_libdir}/libdw.so.1
207 %dir %{_libdir}/elfutils
208 %attr(755,root,root) %{_libdir}/elfutils/lib*.so
209 %{_mandir}/man1/eu-*.1*
212 %defattr(644,root,root,755)
213 %attr(755,root,root) %{_libdir}/libasm.so
214 %attr(755,root,root) %{_libdir}/libdw.so
215 %attr(755,root,root) %{_libdir}/libelf.so
217 %{_includedir}/elfutils
218 %{_includedir}/dwarf.h
219 %{_includedir}/gelf.h
220 %{_includedir}/libelf.h
221 %{_includedir}/nlist.h
223 %files libelf -f %{name}.lang
224 %defattr(644,root,root,755)
225 %attr(755,root,root) /%{_lib}/libelf-*.so
226 %attr(755,root,root) %ghost /%{_lib}/libelf.so.1
229 %defattr(644,root,root,755)