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