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