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