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