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