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