]>
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 |
d7129070 | 8 | Version: 0.170 |
6d3fd36e | 9 | Release: 1 |
3a5346c9 | 10 | License: GPL v2+ or LGPL v3+ (libraries), GPL v3+ (programs) |
d5753979 | 11 | Group: Development/Tools |
21465d47 | 12 | Source0: https://sourceware.org/elfutils/ftp/%{version}/%{name}-%{version}.tar.bz2 |
d7129070 | 13 | # Source0-md5: 03599aee98c9b726c7a732a2dd0245d5 |
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 |
21465d47 | 21 | URL: https://sourceware.org/elfutils/ |
61d61d68 | 22 | BuildRequires: autoconf >= 2.63 |
21465d47 JB |
23 | BuildRequires: automake >= 1:1.11 |
24 | BuildRequires: bzip2-devel | |
6d3fd36e JB |
25 | BuildRequires: gawk |
26 | BuildRequires: gcc >= 6:4.3 | |
9fb2ee6f | 27 | BuildRequires: gettext-tools |
6d3fd36e | 28 | BuildRequires: glibc-devel >= 6:2.7 |
21465d47 | 29 | BuildRequires: libstdc++-devel |
0937133b | 30 | BuildRequires: perl-tools-pod |
21429b83 | 31 | BuildRequires: rpmbuild(macros) >= 1.315 |
b1ad9ed4 | 32 | BuildRequires: sharutils |
21465d47 JB |
33 | BuildRequires: xz-devel |
34 | BuildRequires: zlib-devel | |
4a8c3342 JB |
35 | %if %{with tests} && %(test -d /proc/self ; echo $?) |
36 | # native test needs proc (for libdwfl -p PID to work) | |
37 | BuildRequires: MOUNTED_PROC | |
38 | %endif | |
fb301307 | 39 | Requires: %{name}-libelf = %{version}-%{release} |
7f09d52f | 40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
ecbc8f89 | 41 | |
dea0813b | 42 | # fails to build with -Wl,-s |
43 | %define filterout_ld (-Wl,)?-[sS] (-Wl,)?--strip.* | |
61d61d68 JB |
44 | %if %{with tests} && 0%(echo %{rpmcflags} | grep -q '\<-g' ; echo $?) |
45 | # tests require debug symbols | |
46 | %define specflags -g | |
47 | %endif | |
dea0813b | 48 | |
82cf832a | 49 | %define programprefix eu- |
ecbc8f89 AF |
50 | |
51 | %description | |
d5753979 AF |
52 | Elfutils is a collection of utilities, including ld (a linker), nm |
53 | (for listing symbols from object files), size (for listing the section | |
54 | sizes of an object or archive file), strip (for discarding symbols), | |
55 | readline (the see the raw ELF file structures), and elflint (to check | |
56 | for well-formed ELF files). Also included are numerous helper | |
57 | libraries which implement DWARF, ELF, and machine-specific ELF | |
ecbc8f89 AF |
58 | handling. |
59 | ||
13991385 JR |
60 | %description -l pl.UTF-8 |
61 | Elfutils to zestaw narzędzi, składający się z ld (linkera), nm (do | |
62 | listowania symboli z plików obiektów), size (do listowania rozmiarów | |
63 | sekcji plików obiektów lub archiwów), strip (do usuwania symboli), | |
64 | readline (do oglądania surowych struktur plików ELF) oraz elflint (do | |
65 | sprawdzania poprawności plików ELF). Dołączone są także liczne | |
66 | biblioteki pomocnicze z zaimplementowaną obsługą DWARF, ELF i ELF | |
7f09d52f JB |
67 | specyficznych dla architektury. |
68 | ||
ecbc8f89 | 69 | %package devel |
7f09d52f | 70 | Summary: Development part of libraries to handle compiled objects |
cc5b5c39 | 71 | Summary(pl.UTF-8): Część programistyczna bibliotek do obsługi skompilowanych obiektów |
7f09d52f | 72 | Group: Development/Libraries |
fb301307 | 73 | Requires: %{name} = %{version}-%{release} |
56eb6ae7 JB |
74 | Requires: bzip2-devel |
75 | Requires: xz-devel | |
76 | Requires: zlib-devel | |
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 | |
10cca083 | 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 |
d748a5ee | 149 | |
f2c7e483 | 150 | %{__rm} po/stamp-po |
ecbc8f89 | 151 | |
6d3fd36e | 152 | # temporarily disable failing tests (depending or arch) |
d68cdcb9 JB |
153 | %ifarch x32 |
154 | %{__sed} -i -e 's/run-backtrace-native-biarch.sh//' tests/Makefile.am | |
155 | %endif | |
80e874f2 | 156 | |
ecbc8f89 | 157 | %build |
30cc8b05 | 158 | #%%{__gettextize} |
0f5a32a6 | 159 | %{__aclocal} -I m4 |
d5753979 | 160 | %{__autoheader} |
d5753979 | 161 | %{__autoconf} |
d748a5ee | 162 | %{__automake} |
d5753979 | 163 | %configure \ |
6d3fd36e | 164 | --disable-silent-rules \ |
96e6dfc1 | 165 | --disable-werror \ |
e33ecb8e | 166 | --program-prefix=%{programprefix} |
ecbc8f89 | 167 | |
fb301307 JB |
168 | # make check depends on test-nlist not stripped |
169 | %{__perl} -pi -e 's/^(LDFLAGS =.*)-s/$1/' tests/Makefile | |
170 | ||
b1ad9ed4 | 171 | %{__make} |
0937133b | 172 | %{__make} -C debian/man |
d748a5ee | 173 | |
6771db41 | 174 | %if %{with tests} |
80e874f2 JB |
175 | # some tests rely on English messages |
176 | LC_ALL=C \ | |
6771db41 JB |
177 | %{__make} -C tests check |
178 | %endif | |
0937133b | 179 | |
ecbc8f89 | 180 | %install |
d5753979 | 181 | rm -rf $RPM_BUILD_ROOT |
30cc8b05 | 182 | install -d $RPM_BUILD_ROOT{%{_mandir}/man1,/%{_lib}} |
ecbc8f89 | 183 | |
d5753979 | 184 | %{__make} install \ |
668f585d | 185 | DESTDIR=$RPM_BUILD_ROOT |
ecbc8f89 | 186 | |
0937133b | 187 | install debian/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 |
ecbc8f89 | 188 | |
6d3fd36e | 189 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/{libelf-*.so,libelf.so.*} $RPM_BUILD_ROOT/%{_lib} |
668f585d | 190 | ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libelf-*.so) \ |
6d3fd36e | 191 | $RPM_BUILD_ROOT%{_libdir}/libelf.so |
30cc8b05 | 192 | |
9a404d6e | 193 | %find_lang %{name} |
ecbc8f89 AF |
194 | |
195 | %clean | |
0937133b | 196 | rm -rf $RPM_BUILD_ROOT |
ecbc8f89 | 197 | |
7f09d52f JB |
198 | %post -p /sbin/ldconfig |
199 | %postun -p /sbin/ldconfig | |
ecbc8f89 | 200 | |
7f09d52f JB |
201 | %post libelf -p /sbin/ldconfig |
202 | %postun libelf -p /sbin/ldconfig | |
ecbc8f89 | 203 | |
d748a5ee | 204 | %files |
d5753979 | 205 | %defattr(644,root,root,755) |
3a5346c9 | 206 | %doc AUTHORS CONTRIBUTING ChangeLog NEWS NOTES README THANKS TODO |
668f585d | 207 | %attr(755,root,root) %{_bindir}/eu-* |
0937133b | 208 | %attr(755,root,root) %{_libdir}/libasm-*.so |
b68ac3ec | 209 | %attr(755,root,root) %ghost %{_libdir}/libasm.so.1 |
0937133b | 210 | %attr(755,root,root) %{_libdir}/libdw-*.so |
b68ac3ec | 211 | %attr(755,root,root) %ghost %{_libdir}/libdw.so.1 |
ecbc8f89 | 212 | %dir %{_libdir}/elfutils |
2a18e913 | 213 | %attr(755,root,root) %{_libdir}/elfutils/lib*.so |
668f585d | 214 | %{_mandir}/man1/eu-*.1* |
ecbc8f89 AF |
215 | |
216 | %files devel | |
d5753979 | 217 | %defattr(644,root,root,755) |
0937133b JB |
218 | %attr(755,root,root) %{_libdir}/libasm.so |
219 | %attr(755,root,root) %{_libdir}/libdw.so | |
0937133b JB |
220 | %attr(755,root,root) %{_libdir}/libelf.so |
221 | %{_libdir}/libebl.a | |
668f585d JB |
222 | %{_includedir}/elfutils |
223 | %{_includedir}/dwarf.h | |
224 | %{_includedir}/gelf.h | |
225 | %{_includedir}/libelf.h | |
226 | %{_includedir}/nlist.h | |
56eb6ae7 JB |
227 | %{_pkgconfigdir}/libdw.pc |
228 | %{_pkgconfigdir}/libelf.pc | |
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 |