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