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