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