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