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