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