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