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