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