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