]> git.pld-linux.org Git - packages/elfutils.git/blame - elfutils.spec
up to 0.190
[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
6492a549 11Version: 0.190
07632c40 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
6492a549 16# Source0-md5: 79ad698e61a052bea79e77df6a08bc4b
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
fb301307 50Requires: %{name}-libelf = %{version}-%{release}
07632c40 51Requires: zstd >= 1.4.0
7f09d52f 52BuildRoot: %{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
64Elfutils is a collection of utilities, including ld (a linker), nm
65(for listing symbols from object files), size (for listing the section
66sizes of an object or archive file), strip (for discarding symbols),
67readline (the see the raw ELF file structures), and elflint (to check
68for well-formed ELF files). Also included are numerous helper
69libraries which implement DWARF, ELF, and machine-specific ELF
ecbc8f89
AF
70handling.
71
13991385
JR
72%description -l pl.UTF-8
73Elfutils to zestaw narzędzi, składający się z ld (linkera), nm (do
74listowania symboli z plików obiektów), size (do listowania rozmiarów
75sekcji plików obiektów lub archiwów), strip (do usuwania symboli),
76readline (do oglądania surowych struktur plików ELF) oraz elflint (do
77sprawdzania poprawności plików ELF). Dołączone są także liczne
78biblioteki pomocnicze z zaimplementowaną obsługą DWARF, ELF i ELF
7f09d52f
JB
79specyficznych dla architektury.
80
ecbc8f89 81%package devel
7f09d52f 82Summary: Development part of libraries to handle compiled objects
cc5b5c39 83Summary(pl.UTF-8): Część programistyczna bibliotek do obsługi skompilowanych obiektów
7f09d52f 84Group: Development/Libraries
fb301307 85Requires: %{name} = %{version}-%{release}
56eb6ae7
JB
86Requires: bzip2-devel
87Requires: xz-devel
88Requires: zlib-devel
07632c40 89Requires: zstd-devel >= 1.4.0
4b863075
JB
90Obsoletes: libelf-devel < 0.8.14
91Obsoletes: libelf0-devel < 0.8.14
ecbc8f89
AF
92
93%description devel
7f09d52f
JB
94The elfutils-devel package contains the development part of libraries
95to create applications for handling compiled objects. libelf allows
96you to access the internals of the ELF object file format, so you can
09597f80
JB
97see the different sections of an ELF file. libdw provides access to
98the DWARF debugging information. libasm provides a programmable
99assembler interface.
ecbc8f89 100
13991385
JR
101%description devel -l pl.UTF-8
102Pakiet elfutils-devel zawiera część programistyczną bibliotek do
103tworzenia aplikacji obsługujących skompilowane obiekty. libelf pozwala
104na dostęp do wnętrzności formatu pliku obiektowego ELF, co pozwala na
09597f80
JB
105oglądanie różnych sekcji pliku ELF. libdw pozwala na dostęp do
106informacji DWARF służących do odpluskwiania. libasm udostępnia
107programowalny interfejs asemblera.
7f09d52f 108
ecbc8f89 109%package libelf
7f09d52f 110Summary: Library to read and write ELF files
cc5b5c39 111Summary(pl.UTF-8): Biblioteki do odczytu i zapisu plików ELF
7f09d52f 112Group: Libraries
e21fb8cd 113#Obsoletes: libelf
ecbc8f89
AF
114
115%description libelf
116The elfutils-libelf package provides a DSO which allows reading and
d5753979
AF
117writing ELF files on a high level. Third party programs depend on this
118package to read internals of ELF files. The programs of the elfutils
119package use it also to generate new ELF files.
ecbc8f89 120
13991385
JR
121%description libelf -l pl.UTF-8
122Pakiet elfutils-libelf udostępnia bibliotekę dzieloną, która pozwala
123na wysokopoziomowe czytanie i zapisywanie plików ELF. Inne programy
124wymagają tego pakietu, aby odczytywać zawartość plików ELF. Programy z
125pakietu elfutils używają jej także do generowania nowych plików ELF.
7f09d52f 126
2a18e913 127%package static
7f09d52f 128Summary: Static libraries to handle compiled objects
cc5b5c39 129Summary(pl.UTF-8): Statyczne biblioteki do obsługi skompilowanych obiektów
7f09d52f 130Group: Development/Libraries
fb301307 131Requires: %{name}-devel = %{version}-%{release}
07632c40 132Requires: zstd >= 1.4.0
4b863075 133Obsoletes: libelf-static < 0.8.14
2a18e913
AF
134
135%description static
136The elfutils-static package contains the static libraries to create
137applications for handling compiled objects. libelf allows you to
138access the internals of the ELF object file format, so you can see the
09597f80 139different sections of an ELF file. libdw provides access to the DWARF
2a18e913
AF
140debugging information. libasm provides a programmable assembler
141interface.
142
13991385 143%description static -l pl.UTF-8
7f09d52f 144Pakiet elfutils-static zawiera statyczne biblioteki do tworzenia
13991385
JR
145aplikacji obsługujących skompilowane obiekty. libelf pozwala na dostęp
146do wnętrzności formatu pliku obiektowego ELF, co pozwala na oglądanie
09597f80
JB
147różnych sekcji pliku ELF. libdw pozwala na dostęp do informacji DWARF
148służących do odpluskwiania. libasm udostępnia programowalny interfejs
149asemblera.
150
151%package debuginfod
2cfb18bf
JP
152Summary: debuginfod server and client
153Summary(pl.UTF-8): Serwer i klient debuginfod
09597f80
JB
154Group: Libraries
155Requires: %{name} = %{version}-%{release}
2cfb18bf 156Requires: %{name}-debuginfod-libs = %{version}-%{release}
09597f80
JB
157Requires: libarchive >= 3.1.2
158Requires: libmicrohttpd >= 0.9.33
0e6a27de 159Requires: sqlite3-libs >= 3.7.17
09597f80
JB
160
161%description debuginfod
2cfb18bf 162debuginfod server and client.
09597f80
JB
163
164%description debuginfod -l pl.UTF-8
2cfb18bf
JP
165Serwer i klient debuginfod.
166
167%package debuginfod-libs
168Summary: debuginfod library
169Summary(pl.UTF-8): Biblioteka debuginfod
170Group: Libraries
53e54a6f 171Requires: %{name}-libelf = %{version}-%{release}
2cfb18bf
JP
172Requires: curl-libs >= 7.29.0
173Conflicts: elfutils-debuginfod < 0.187-3
174
175%description debuginfod-libs
176debuginfod library.
177
178%description debuginfod-libs -l pl.UTF-8
179Biblioteka debuginfod.
09597f80
JB
180
181%package debuginfod-devel
182Summary: Header file for debuginfod library
183Summary(pl.UTF-8): Plik nagłówkowy biblioteki debuginfod
184Group: Development/Libraries
2cfb18bf 185Requires: %{name}-debuginfod-libs = %{version}-%{release}
09597f80
JB
186Requires: %{name}-devel = %{version}-%{release}
187
188%description debuginfod-devel
189Header file for debuginfod library.
190
191%description debuginfod-devel -l pl.UTF-8
192Plik 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
234LC_ALL=C \
6771db41
JB
235%{__make} -C tests check
236%endif
0937133b 237
ecbc8f89 238%install
d5753979 239rm -rf $RPM_BUILD_ROOT
30cc8b05 240install -d $RPM_BUILD_ROOT{%{_mandir}/man1,/%{_lib}}
ecbc8f89 241
d5753979 242%{__make} install \
668f585d 243 DESTDIR=$RPM_BUILD_ROOT
ecbc8f89 244
0937133b 245install 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 248ln -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 254rm -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
This page took 0.450137 seconds and 4 git commands to generate.