]> git.pld-linux.org Git - packages/elfutils.git/blob - elfutils.spec
0ebaaa14c5e4834efb4392d4391c3a14c4e8ea83
[packages/elfutils.git] / elfutils.spec
1 #
2 # Conditional build:
3 %bcond_without  debuginfod      # debuginfod server and client
4 %bcond_without  tests   # do not perform tests
5 #
6 Summary:        A collection of utilities and DSOs to handle compiled objects
7 Summary(pl.UTF-8):      Zestaw narzędzi i bibliotek do obsługi skompilowanych obiektów
8 Name:           elfutils
9 Version:        0.187
10 Release:        2
11 License:        GPL v2+ or LGPL v3+ (libraries), GPL v3+ (programs)
12 Group:          Development/Tools
13 Source0:        https://sourceware.org/elfutils/ftp/%{version}/%{name}-%{version}.tar.bz2
14 # Source0-md5:  cc04f07b53a71616b22553c0a458cf4b
15 Patch0:         %{name}-pl.po.patch
16 Patch1:         %{name}-debian-manpages.patch
17 Patch2:         %{name}-awk.patch
18 Patch3:         %{name}-align.patch
19 Patch4:         %{name}-paxflags.patch
20 Patch5:         %{name}-sparc.patch
21 Patch6:         disable-tests.patch
22 URL:            https://sourceware.org/elfutils/
23 BuildRequires:  autoconf >= 2.63
24 BuildRequires:  automake >= 1:1.11
25 %{?with_tests:BuildRequires:    bsdtar}
26 BuildRequires:  bzip2-devel
27 BuildRequires:  gawk
28 BuildRequires:  gcc >= 6:4.3
29 BuildRequires:  gettext-tools >= 0.19.6
30 BuildRequires:  glibc-devel >= 6:2.7
31 BuildRequires:  libstdc++-devel >= 6:4.7
32 BuildRequires:  perl-tools-pod
33 BuildRequires:  rpmbuild(macros) >= 1.527
34 BuildRequires:  sharutils
35 BuildRequires:  xz-devel
36 BuildRequires:  zlib-devel
37 BuildRequires:  zstd-devel
38 %if %{with tests} && %(test -d /proc/self ; echo $?)
39 # native test needs proc (for libdwfl -p PID to work)
40 BuildRequires:  MOUNTED_PROC
41 %endif
42 %if %{with debuginfod}
43 BuildRequires:  curl-devel >= 7.29.0
44 BuildRequires:  libarchive-devel >= 3.1.2
45 BuildRequires:  libmicrohttpd-devel >= 0.9.33
46 BuildRequires:  sqlite3-devel >= 3.7.17
47 %endif
48 Requires:       %{name}-libelf = %{version}-%{release}
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 # fails to build with -Wl,-s
52 %define         filterout_ld    (-Wl,)?-[sS] (-Wl,)?--strip.*
53 %if %{with tests} && 0%(echo %{rpmcflags} | grep -q '\<-g' ; echo $?)
54 # tests require debug symbols
55 %define         specflags       -g
56 %endif
57
58 %define         programprefix   eu-
59
60 %description
61 Elfutils is a collection of utilities, including ld (a linker), nm
62 (for listing symbols from object files), size (for listing the section
63 sizes of an object or archive file), strip (for discarding symbols),
64 readline (the see the raw ELF file structures), and elflint (to check
65 for well-formed ELF files). Also included are numerous helper
66 libraries which implement DWARF, ELF, and machine-specific ELF
67 handling.
68
69 %description -l pl.UTF-8
70 Elfutils to zestaw narzędzi, składający się z ld (linkera), nm (do
71 listowania symboli z plików obiektów), size (do listowania rozmiarów
72 sekcji plików obiektów lub archiwów), strip (do usuwania symboli),
73 readline (do oglądania surowych struktur plików ELF) oraz elflint (do
74 sprawdzania poprawności plików ELF). Dołączone są także liczne
75 biblioteki pomocnicze z zaimplementowaną obsługą DWARF, ELF i ELF
76 specyficznych dla architektury.
77
78 %package devel
79 Summary:        Development part of libraries to handle compiled objects
80 Summary(pl.UTF-8):      Część programistyczna bibliotek do obsługi skompilowanych obiektów
81 Group:          Development/Libraries
82 Requires:       %{name} = %{version}-%{release}
83 Requires:       bzip2-devel
84 Requires:       xz-devel
85 Requires:       zlib-devel
86 Obsoletes:      libelf-devel < 0.8.14
87 Obsoletes:      libelf0-devel < 0.8.14
88
89 %description devel
90 The elfutils-devel package contains the development part of libraries
91 to create applications for handling compiled objects. libelf allows
92 you to access the internals of the ELF object file format, so you can
93 see the different sections of an ELF file. libdw provides access to
94 the DWARF debugging information. libasm provides a programmable
95 assembler interface.
96
97 %description devel -l pl.UTF-8
98 Pakiet elfutils-devel zawiera część programistyczną bibliotek do
99 tworzenia aplikacji obsługujących skompilowane obiekty. libelf pozwala
100 na dostęp do wnętrzności formatu pliku obiektowego ELF, co pozwala na
101 oglądanie różnych sekcji pliku ELF. libdw pozwala na dostęp do
102 informacji DWARF służących do odpluskwiania. libasm udostępnia
103 programowalny interfejs asemblera.
104
105 %package libelf
106 Summary:        Library to read and write ELF files
107 Summary(pl.UTF-8):      Biblioteki do odczytu i zapisu plików ELF
108 Group:          Libraries
109 #Obsoletes:     libelf
110
111 %description libelf
112 The elfutils-libelf package provides a DSO which allows reading and
113 writing ELF files on a high level. Third party programs depend on this
114 package to read internals of ELF files. The programs of the elfutils
115 package use it also to generate new ELF files.
116
117 %description libelf -l pl.UTF-8
118 Pakiet elfutils-libelf udostępnia bibliotekę dzieloną, która pozwala
119 na wysokopoziomowe czytanie i zapisywanie plików ELF. Inne programy
120 wymagają tego pakietu, aby odczytywać zawartość plików ELF. Programy z
121 pakietu elfutils używają jej także do generowania nowych plików ELF.
122
123 %package static
124 Summary:        Static libraries to handle compiled objects
125 Summary(pl.UTF-8):      Statyczne biblioteki do obsługi skompilowanych obiektów
126 Group:          Development/Libraries
127 Requires:       %{name}-devel = %{version}-%{release}
128 Obsoletes:      libelf-static < 0.8.14
129
130 %description static
131 The elfutils-static package contains the static libraries to create
132 applications for handling compiled objects. libelf allows you to
133 access the internals of the ELF object file format, so you can see the
134 different sections of an ELF file. libdw provides access to the DWARF
135 debugging information. libasm provides a programmable assembler
136 interface.
137
138 %description static -l pl.UTF-8
139 Pakiet elfutils-static zawiera statyczne biblioteki do tworzenia
140 aplikacji obsługujących skompilowane obiekty. libelf pozwala na dostęp
141 do wnętrzności formatu pliku obiektowego ELF, co pozwala na oglądanie
142 różnych sekcji pliku ELF. libdw pozwala na dostęp do informacji DWARF
143 służących do odpluskwiania. libasm udostępnia programowalny interfejs
144 asemblera.
145
146 %package debuginfod
147 Summary:        debuginfod library, server and client
148 Summary(pl.UTF-8):      Biblioteka, serwer i klient debuginfod
149 Group:          Libraries
150 Requires:       %{name} = %{version}-%{release}
151 %if %{with debuginfod}
152 # for library
153 Requires:       curl-libs >= 7.29.0
154 # the rest for server
155 Requires:       libarchive >= 3.1.2
156 Requires:       libmicrohttpd >= 0.9.33
157 Requires:       sqlite3 >= 3.7.17
158 %endif
159
160 %description debuginfod
161 debuginfod library, server and client.
162
163 %description debuginfod -l pl.UTF-8
164 Biblioteka, serwer i klient debuginfod.
165
166 %package debuginfod-devel
167 Summary:        Header file for debuginfod library
168 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki debuginfod
169 Group:          Development/Libraries
170 Requires:       %{name}-debuginfod = %{version}-%{release}
171 Requires:       %{name}-devel = %{version}-%{release}
172
173 %description debuginfod-devel
174 Header file for debuginfod library.
175
176 %description debuginfod-devel -l pl.UTF-8
177 Plik nagłówkowy biblioteki debuginfod.
178
179 %prep
180 %setup -q
181 %patch0 -p1
182 %patch1 -p1
183 %patch2 -p1
184 %patch3 -p1
185 %patch4 -p1
186 %patch5 -p1
187 %patch6 -p1
188
189 %{__rm} po/stamp-po
190
191 # temporarily disable failing tests (depending on arch)
192 %ifarch x32
193 %{__sed} -i -e 's/run-backtrace-native-biarch.sh//' tests/Makefile.am
194 %endif
195
196 # make sure this is not even tried on arch it has no chance to run
197 %ifarch %{ix86}
198 %{__sed} -i -e 's/run-disasm-x86-64.sh//' tests/Makefile.am
199 %endif
200
201 %build
202 #%%{__gettextize}
203 %{__aclocal} -I m4
204 %{__autoconf}
205 %{__autoheader}
206 %{__automake}
207 %configure \
208         --disable-silent-rules \
209         %{__enable_disable debuginfod} \
210         --program-prefix=%{programprefix}
211
212 # make check depends on test-nlist not stripped
213 %{__perl} -pi -e 's/^(LDFLAGS =.*)-s/$1/' tests/Makefile
214
215 %{__make}
216 %{__make} -C debian/man
217
218 %if %{with tests}
219 # some tests rely on English messages
220 LC_ALL=C \
221 %{__make} -C tests check
222 %endif
223
224 %install
225 rm -rf $RPM_BUILD_ROOT
226 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,/%{_lib}}
227
228 %{__make} install \
229         DESTDIR=$RPM_BUILD_ROOT
230
231 install debian/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
232
233 %{__mv} $RPM_BUILD_ROOT%{_libdir}/{libelf-*.so,libelf.so.*} $RPM_BUILD_ROOT/%{_lib}
234 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libelf-*.so) \
235         $RPM_BUILD_ROOT%{_libdir}/libelf.so
236
237 %find_lang %{name}
238
239 %clean
240 rm -rf $RPM_BUILD_ROOT
241
242 %post   -p /sbin/ldconfig
243 %postun -p /sbin/ldconfig
244
245 %post   libelf -p /sbin/ldconfig
246 %postun libelf -p /sbin/ldconfig
247
248 %post   debuginfod -p /sbin/ldconfig
249 %postun debuginfod -p /sbin/ldconfig
250
251 %files
252 %defattr(644,root,root,755)
253 %doc AUTHORS CONTRIBUTING ChangeLog NEWS NOTES README THANKS TODO
254 %attr(755,root,root) %{_bindir}/eu-*
255 %attr(755,root,root) %{_libdir}/libasm-*.so
256 %attr(755,root,root) %ghost %{_libdir}/libasm.so.1
257 %attr(755,root,root) %{_libdir}/libdw-*.so
258 %attr(755,root,root) %ghost %{_libdir}/libdw.so.1
259 %{_mandir}/man1/eu-*.1*
260
261 %files devel
262 %defattr(644,root,root,755)
263 %attr(755,root,root) %{_libdir}/libasm.so
264 %attr(755,root,root) %{_libdir}/libdw.so
265 %attr(755,root,root) %{_libdir}/libelf.so
266 %{_includedir}/dwarf.h
267 %{_includedir}/gelf.h
268 %{_includedir}/libelf.h
269 %{_includedir}/nlist.h
270 %dir %{_includedir}/elfutils
271 %{_includedir}/elfutils/elf-knowledge.h
272 %{_includedir}/elfutils/known-dwarf.h
273 %{_includedir}/elfutils/libasm.h
274 %{_includedir}/elfutils/libdw.h
275 %{_includedir}/elfutils/libdwelf.h
276 %{_includedir}/elfutils/libdwfl.h
277 %{_includedir}/elfutils/version.h
278 %{_pkgconfigdir}/libdw.pc
279 %{_pkgconfigdir}/libelf.pc
280 %{_mandir}/man3/elf_begin.3*
281 %{_mandir}/man3/elf_clone.3*
282 %{_mandir}/man3/elf_getdata.3*
283 %{_mandir}/man3/elf_update.3*
284
285 %files libelf -f %{name}.lang
286 %defattr(644,root,root,755)
287 %attr(755,root,root) /%{_lib}/libelf-*.so
288 %attr(755,root,root) %ghost /%{_lib}/libelf.so.1
289
290 %files static
291 %defattr(644,root,root,755)
292 %{_libdir}/libasm.a
293 %{_libdir}/libdw.a
294 %{_libdir}/libelf.a
295
296 %if %{with debuginfod}
297 %files debuginfod
298 %defattr(644,root,root,755)
299 %attr(755,root,root) %{_libdir}/libdebuginfod-*.so
300 %attr(755,root,root) %ghost %{_libdir}/libdebuginfod.so.1
301 %attr(755,root,root) %{_bindir}/debuginfod
302 %attr(755,root,root) %{_bindir}/debuginfod-find
303 %{_mandir}/man1/debuginfod-find.1*
304 %{_mandir}/man7/debuginfod-client-config.7*
305 %{_mandir}/man8/debuginfod.8*
306 %attr(755,root,root) /etc/profile.d/debuginfod.sh
307 %attr(755,root,root) /etc/profile.d/debuginfod.csh
308
309 %files debuginfod-devel
310 %defattr(644,root,root,755)
311 %attr(755,root,root) %{_libdir}/libdebuginfod.so
312 %{_includedir}/elfutils/debuginfod.h
313 %{_pkgconfigdir}/libdebuginfod.pc
314 %{_mandir}/man3/debuginfod_*.3*
315 %endif
This page took 0.442265 seconds and 3 git commands to generate.