]> git.pld-linux.org Git - packages/elfutils.git/blame - elfutils.spec
- let it build using gcc 4.[12], not only 4.3.x
[packages/elfutils.git] / elfutils.spec
CommitLineData
fb301307
JB
1#
2# Conditional build:
0f22fc8f 3%bcond_without tests # do not perform tests
fb301307 4#
7f09d52f 5Summary: A collection of utilities and DSOs to handle compiled objects
cc5b5c39 6Summary(pl.UTF-8): Zestaw narzędzi i bibliotek do obsługi skompilowanych obiektów
d5753979 7Name: elfutils
e8d7e46b 8Version: 0.135
b236e119 9Release: 1
a387ef5e 10License: GPL v2 with OSL linking exception
d5753979 11Group: Development/Tools
47d694b2 12Source0: https://fedorahosted.org/releases/e/l/elfutils/%{name}-%{version}.tar.gz
e8d7e46b 13# Source0-md5: 2fb0d3d9cdb22f71ad0df91d676bb2eb
b1ad9ed4 14Patch0: %{name}-pl.po.patch
0937133b 15Patch1: %{name}-debian-manpages.patch
30cc8b05 16Patch2: %{name}-portability.patch
6e7aa217
JB
17Patch3: %{name}-robustify.patch
18Patch4: %{name}-align.patch
2adb9a49 19Patch5: %{name}-paxflags.patch
d748a5ee 20Patch6: %{name}-sparc.patch
e8d7e46b
JB
21Patch7: %{name}-inline.patch
22Patch8: %{name}-Werror.patch
47d694b2 23URL: https://fedorahosted.org/elfutils/
5a22e3bf 24BuildRequires: autoconf >= 2.59
fb1f2abe 25BuildRequires: automake >= 1:1.7
754b8f17 26BuildRequires: gcc >= 5:3.4
b1ad9ed4 27BuildRequires: gettext-devel
5ac8a270 28%ifarch %{x8664} alpha ia64 ppc64 s390x sparc64
13e1fe93 29# PR*FAST{8,16} in <inttypes.h> were broken for 64-bit archs in older versions
ad511c9f 30# also needed for nanosecond timestamps on alpha
13e1fe93
JB
31BuildRequires: glibc-devel >= 6:2.3.4
32%endif
0937133b 33BuildRequires: perl-tools-pod
21429b83 34BuildRequires: rpmbuild(macros) >= 1.315
b1ad9ed4 35BuildRequires: sharutils
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
fb301307 40Requires: %{name}-libelf = %{version}-%{release}
7f09d52f 41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
ecbc8f89 42
dea0813b 43# fails to build with -Wl,-s
44%define filterout_ld (-Wl,)?-[sS] (-Wl,)?--strip.*
45
82cf832a 46%define programprefix eu-
ecbc8f89
AF
47
48%description
d5753979
AF
49Elfutils is a collection of utilities, including ld (a linker), nm
50(for listing symbols from object files), size (for listing the section
51sizes of an object or archive file), strip (for discarding symbols),
52readline (the see the raw ELF file structures), and elflint (to check
53for well-formed ELF files). Also included are numerous helper
54libraries which implement DWARF, ELF, and machine-specific ELF
ecbc8f89
AF
55handling.
56
13991385
JR
57%description -l pl.UTF-8
58Elfutils to zestaw narzędzi, składający się z ld (linkera), nm (do
59listowania symboli z plików obiektów), size (do listowania rozmiarów
60sekcji plików obiektów lub archiwów), strip (do usuwania symboli),
61readline (do oglądania surowych struktur plików ELF) oraz elflint (do
62sprawdzania poprawności plików ELF). Dołączone są także liczne
63biblioteki pomocnicze z zaimplementowaną obsługą DWARF, ELF i ELF
7f09d52f
JB
64specyficznych dla architektury.
65
ecbc8f89 66%package devel
7f09d52f 67Summary: Development part of libraries to handle compiled objects
cc5b5c39 68Summary(pl.UTF-8): Część programistyczna bibliotek do obsługi skompilowanych obiektów
7f09d52f 69Group: Development/Libraries
fb301307 70Requires: %{name} = %{version}-%{release}
d5753979 71Obsoletes: libelf-devel
ecbc8f89
AF
72
73%description devel
7f09d52f
JB
74The elfutils-devel package contains the development part of libraries
75to create applications for handling compiled objects. libelf allows
76you to access the internals of the ELF object file format, so you can
77see the different sections of an ELF file. libebl provides some
78higher-level ELF access functionality. libdwarf provides access to the
79DWARF debugging information. libasm provides a programmable assembler
ecbc8f89
AF
80interface.
81
13991385
JR
82%description devel -l pl.UTF-8
83Pakiet elfutils-devel zawiera część programistyczną bibliotek do
84tworzenia aplikacji obsługujących skompilowane obiekty. libelf pozwala
85na dostęp do wnętrzności formatu pliku obiektowego ELF, co pozwala na
86oglądanie różnych sekcji pliku ELF. libebl udostępnia funkcjonalność
87dostępu do plików ELF trochę wyższego poziomu. libdwarf pozwala na
88dostęp do informacji DWARF służących do odpluskwiania. libasm
89udostępnia programowalny interfejs asemblera.
7f09d52f 90
ecbc8f89 91%package libelf
7f09d52f 92Summary: Library to read and write ELF files
cc5b5c39 93Summary(pl.UTF-8): Biblioteki do odczytu i zapisu plików ELF
7f09d52f 94Group: Libraries
e21fb8cd 95#Obsoletes: libelf
ecbc8f89
AF
96
97%description libelf
98The elfutils-libelf package provides a DSO which allows reading and
d5753979
AF
99writing ELF files on a high level. Third party programs depend on this
100package to read internals of ELF files. The programs of the elfutils
101package use it also to generate new ELF files.
ecbc8f89 102
13991385
JR
103%description libelf -l pl.UTF-8
104Pakiet elfutils-libelf udostępnia bibliotekę dzieloną, która pozwala
105na wysokopoziomowe czytanie i zapisywanie plików ELF. Inne programy
106wymagają tego pakietu, aby odczytywać zawartość plików ELF. Programy z
107pakietu elfutils używają jej także do generowania nowych plików ELF.
7f09d52f 108
2a18e913 109%package static
7f09d52f 110Summary: Static libraries to handle compiled objects
cc5b5c39 111Summary(pl.UTF-8): Statyczne biblioteki do obsługi skompilowanych obiektów
7f09d52f 112Group: Development/Libraries
fb301307 113Requires: %{name}-devel = %{version}-%{release}
9da385b9 114Obsoletes: libelf-static
2a18e913
AF
115
116%description static
117The elfutils-static package contains the static libraries to create
118applications for handling compiled objects. libelf allows you to
119access the internals of the ELF object file format, so you can see the
120different sections of an ELF file. libebl provides some higher-level
121ELF access functionality. libdwarf provides access to the DWARF
122debugging information. libasm provides a programmable assembler
123interface.
124
13991385 125%description static -l pl.UTF-8
7f09d52f 126Pakiet elfutils-static zawiera statyczne biblioteki do tworzenia
13991385
JR
127aplikacji obsługujących skompilowane obiekty. libelf pozwala na dostęp
128do wnętrzności formatu pliku obiektowego ELF, co pozwala na oglądanie
129różnych sekcji pliku ELF. libebl udostępnia funkcjonalność dostępu do
130plików ELF trochę wyższego poziomu. libdwarf pozwala na dostęp do
131informacji DWARF służących do odpluskwiania. libasm udostępnia
7f09d52f 132programowalny interfejs asemblera.
2a18e913 133
ecbc8f89
AF
134%prep
135%setup -q
9a404d6e 136%patch0 -p1
0937133b 137%patch1 -p1
5d5c3b33 138%patch2 -p1
30cc8b05
JR
139%patch3 -p1
140%patch4 -p1
f1d8205d 141%patch5 -p1
3dfc27e9 142%patch6 -p1
4a8c3342 143%patch7 -p1
e8d7e46b 144%patch8 -p1
d748a5ee
JB
145
146rm -f po/stamp-po
ecbc8f89 147
82cf832a 148# temporarily disable test failing on specific archs
e5c7956c 149%ifarch alpha
82cf832a
JB
150%{__perl} -pi -e 's/run-elflint-self.sh//' tests/Makefile
151%endif
80e874f2 152
ecbc8f89 153%build
30cc8b05 154#%%{__gettextize}
d5753979
AF
155%{__aclocal}
156%{__autoheader}
d5753979 157%{__autoconf}
d748a5ee 158%{__automake}
d5753979 159%configure \
82cf832a 160 --program-prefix=%{programprefix} \
7f09d52f 161 --enable-shared
ecbc8f89 162
fb301307
JB
163# make check depends on test-nlist not stripped
164%{__perl} -pi -e 's/^(LDFLAGS =.*)-s/$1/' tests/Makefile
165
b1ad9ed4 166%{__make}
0937133b 167%{__make} -C debian/man
d748a5ee 168
6771db41 169%if %{with tests}
80e874f2
JB
170# some tests rely on English messages
171LC_ALL=C \
6771db41
JB
172%{__make} -C tests check
173%endif
0937133b 174
ecbc8f89 175%install
d5753979 176rm -rf $RPM_BUILD_ROOT
30cc8b05 177install -d $RPM_BUILD_ROOT{%{_mandir}/man1,/%{_lib}}
ecbc8f89 178
d5753979 179%{__make} install \
668f585d 180 DESTDIR=$RPM_BUILD_ROOT
ecbc8f89 181
0937133b 182install debian/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
ecbc8f89 183
668f585d
JB
184mv $RPM_BUILD_ROOT%{_libdir}/{libelf-*.so,libelf.so.*} $RPM_BUILD_ROOT/%{_lib}
185ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libelf-*.so) \
30cc8b05
JR
186 $RPM_BUILD_ROOT%{_libdir}/libelf.so
187
9a404d6e 188%find_lang %{name}
ecbc8f89
AF
189
190%clean
0937133b 191rm -rf $RPM_BUILD_ROOT
ecbc8f89 192
7f09d52f
JB
193%post -p /sbin/ldconfig
194%postun -p /sbin/ldconfig
ecbc8f89 195
7f09d52f
JB
196%post libelf -p /sbin/ldconfig
197%postun libelf -p /sbin/ldconfig
ecbc8f89 198
d748a5ee 199%files
d5753979 200%defattr(644,root,root,755)
54a69a2e 201%doc AUTHORS EXCEPTION NEWS NOTES README THANKS TODO
668f585d 202%attr(755,root,root) %{_bindir}/eu-*
0937133b 203%attr(755,root,root) %{_libdir}/libasm-*.so
ddf1f990 204%ghost %attr(755,root,root) %{_libdir}/libasm.so.*
0937133b 205%attr(755,root,root) %{_libdir}/libdw-*.so
ddf1f990 206%ghost %attr(755,root,root) %{_libdir}/libdw.so.*
ecbc8f89 207%dir %{_libdir}/elfutils
2a18e913 208%attr(755,root,root) %{_libdir}/elfutils/lib*.so
668f585d 209%{_mandir}/man1/eu-*.1*
ecbc8f89
AF
210
211%files devel
d5753979 212%defattr(644,root,root,755)
0937133b
JB
213%attr(755,root,root) %{_libdir}/libasm.so
214%attr(755,root,root) %{_libdir}/libdw.so
0937133b
JB
215%attr(755,root,root) %{_libdir}/libelf.so
216%{_libdir}/libebl.a
668f585d
JB
217%{_includedir}/elfutils
218%{_includedir}/dwarf.h
219%{_includedir}/gelf.h
220%{_includedir}/libelf.h
221%{_includedir}/nlist.h
ecbc8f89 222
d748a5ee 223%files libelf -f %{name}.lang
d5753979 224%defattr(644,root,root,755)
30cc8b05 225%attr(755,root,root) /%{_lib}/libelf-*.so
ddf1f990 226%ghost %attr(755,root,root) /%{_lib}/libelf.so.*
2a18e913
AF
227
228%files static
229%defattr(644,root,root,755)
0937133b
JB
230%{_libdir}/libasm.a
231%{_libdir}/libdw.a
0937133b 232%{_libdir}/libelf.a
This page took 1.16813 seconds and 4 git commands to generate.