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