]> git.pld-linux.org Git - packages/elfutils.git/blob - elfutils.spec
- add -strings_c.patch
[packages/elfutils.git] / elfutils.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform tests
4 #
5 Summary:        A collection of utilities and DSOs to handle compiled objects
6 Summary(pl.UTF-8):      Zestaw narzędzi i bibliotek do obsługi skompilowanych obiektów
7 Name:           elfutils
8 Version:        0.145
9 Release:        2
10 License:        GPL v2 with OSL linking exception
11 Group:          Development/Tools
12 Source0:        https://fedorahosted.org/releases/e/l/elfutils/%{name}-%{version}.tar.bz2
13 # Source0-md5:  af325a39c5a534de5b15c2a727a4e203
14 Patch0:         %{name}-pl.po.patch
15 Patch1:         %{name}-debian-manpages.patch
16 Patch2:         %{name}-portability.patch
17 Patch3:         %{name}-robustify.patch
18 Patch4:         %{name}-align.patch
19 Patch5:         %{name}-paxflags.patch
20 Patch6:         %{name}-sparc.patch
21 Patch7:         %{name}-inline.patch
22 Patch8:         %{name}-scanf.patch
23 Patch9:         %{name}-strings_c.patch
24 URL:            https://fedorahosted.org/elfutils/
25 BuildRequires:  autoconf >= 2.59
26 BuildRequires:  automake >= 1:1.7
27 BuildRequires:  gcc >= 5:3.4
28 BuildRequires:  gettext-devel
29 %ifarch %{x8664} alpha ia64 ppc64 s390x sparc64
30 # PR*FAST{8,16} in <inttypes.h> were broken for 64-bit archs in older versions
31 # also needed for nanosecond timestamps on alpha
32 BuildRequires:  glibc-devel >= 6:2.3.4
33 %endif
34 BuildRequires:  perl-tools-pod
35 BuildRequires:  rpmbuild(macros) >= 1.315
36 BuildRequires:  sharutils
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 Requires:       %{name}-libelf = %{version}-%{release}
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 # fails to build with -Wl,-s
45 %define         filterout_ld    (-Wl,)?-[sS] (-Wl,)?--strip.*
46
47 %define         programprefix   eu-
48
49 %description
50 Elfutils is a collection of utilities, including ld (a linker), nm
51 (for listing symbols from object files), size (for listing the section
52 sizes of an object or archive file), strip (for discarding symbols),
53 readline (the see the raw ELF file structures), and elflint (to check
54 for well-formed ELF files). Also included are numerous helper
55 libraries which implement DWARF, ELF, and machine-specific ELF
56 handling.
57
58 %description -l pl.UTF-8
59 Elfutils to zestaw narzędzi, składający się z ld (linkera), nm (do
60 listowania symboli z plików obiektów), size (do listowania rozmiarów
61 sekcji plików obiektów lub archiwów), strip (do usuwania symboli),
62 readline (do oglądania surowych struktur plików ELF) oraz elflint (do
63 sprawdzania poprawności plików ELF). Dołączone są także liczne
64 biblioteki pomocnicze z zaimplementowaną obsługą DWARF, ELF i ELF
65 specyficznych dla architektury.
66
67 %package devel
68 Summary:        Development part of libraries to handle compiled objects
69 Summary(pl.UTF-8):      Część programistyczna bibliotek do obsługi skompilowanych obiektów
70 Group:          Development/Libraries
71 Requires:       %{name} = %{version}-%{release}
72 Obsoletes:      libelf-devel
73
74 %description devel
75 The elfutils-devel package contains the development part of libraries
76 to create applications for handling compiled objects. libelf allows
77 you to access the internals of the ELF object file format, so you can
78 see the different sections of an ELF file. libebl provides some
79 higher-level ELF access functionality. libdwarf provides access to the
80 DWARF debugging information. libasm provides a programmable assembler
81 interface.
82
83 %description devel -l pl.UTF-8
84 Pakiet elfutils-devel zawiera część programistyczną bibliotek do
85 tworzenia aplikacji obsługujących skompilowane obiekty. libelf pozwala
86 na dostęp do wnętrzności formatu pliku obiektowego ELF, co pozwala na
87 oglądanie różnych sekcji pliku ELF. libebl udostępnia funkcjonalność
88 dostępu do plików ELF trochę wyższego poziomu. libdwarf pozwala na
89 dostęp do informacji DWARF służących do odpluskwiania. libasm
90 udostępnia programowalny interfejs asemblera.
91
92 %package libelf
93 Summary:        Library to read and write ELF files
94 Summary(pl.UTF-8):      Biblioteki do odczytu i zapisu plików ELF
95 Group:          Libraries
96 #Obsoletes:     libelf
97
98 %description libelf
99 The elfutils-libelf package provides a DSO which allows reading and
100 writing ELF files on a high level. Third party programs depend on this
101 package to read internals of ELF files. The programs of the elfutils
102 package use it also to generate new ELF files.
103
104 %description libelf -l pl.UTF-8
105 Pakiet elfutils-libelf udostępnia bibliotekę dzieloną, która pozwala
106 na wysokopoziomowe czytanie i zapisywanie plików ELF. Inne programy
107 wymagają tego pakietu, aby odczytywać zawartość plików ELF. Programy z
108 pakietu elfutils używają jej także do generowania nowych plików ELF.
109
110 %package static
111 Summary:        Static libraries to handle compiled objects
112 Summary(pl.UTF-8):      Statyczne biblioteki do obsługi skompilowanych obiektów
113 Group:          Development/Libraries
114 Requires:       %{name}-devel = %{version}-%{release}
115 Obsoletes:      libelf-static
116
117 %description static
118 The elfutils-static package contains the static libraries to create
119 applications for handling compiled objects. libelf allows you to
120 access the internals of the ELF object file format, so you can see the
121 different sections of an ELF file. libebl provides some higher-level
122 ELF access functionality. libdwarf provides access to the DWARF
123 debugging information. libasm provides a programmable assembler
124 interface.
125
126 %description static -l pl.UTF-8
127 Pakiet elfutils-static zawiera statyczne biblioteki do tworzenia
128 aplikacji obsługujących skompilowane obiekty. libelf pozwala na dostęp
129 do wnętrzności formatu pliku obiektowego ELF, co pozwala na oglądanie
130 różnych sekcji pliku ELF. libebl udostępnia funkcjonalność dostępu do
131 plików ELF trochę wyższego poziomu. libdwarf pozwala na dostęp do
132 informacji DWARF służących do odpluskwiania. libasm udostępnia
133 programowalny interfejs asemblera.
134
135 %prep
136 %setup -q
137 %patch0 -p1
138 %patch1 -p1
139 %patch2 -p1
140 %patch3 -p1
141 %patch4 -p1
142 %patch5 -p1
143 %patch6 -p1
144 %patch7 -p1
145 %patch8 -p1
146 %patch9 -p0
147
148 rm -f po/stamp-po
149
150 # temporarily disable test failing on specific archs
151 %ifarch alpha
152 %{__perl} -pi -e 's/run-elflint-self.sh//' tests/Makefile
153 %endif
154
155 %build
156 #%%{__gettextize}
157 %{__aclocal} -I m4
158 %{__autoheader}
159 %{__autoconf}
160 %{__automake}
161 %configure \
162         --program-prefix=%{programprefix}
163
164 # make check depends on test-nlist not stripped
165 %{__perl} -pi -e 's/^(LDFLAGS =.*)-s/$1/' tests/Makefile
166
167 %{__make}
168 %{__make} -C debian/man
169
170 %if %{with tests}
171 # some tests rely on English messages
172 LC_ALL=C \
173 %{__make} -C tests check
174 %endif
175
176 %install
177 rm -rf $RPM_BUILD_ROOT
178 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,/%{_lib}}
179
180 %{__make} install \
181         DESTDIR=$RPM_BUILD_ROOT
182
183 install debian/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
184
185 mv $RPM_BUILD_ROOT%{_libdir}/{libelf-*.so,libelf.so.*} $RPM_BUILD_ROOT/%{_lib}
186 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libelf-*.so) \
187         $RPM_BUILD_ROOT%{_libdir}/libelf.so
188
189 %find_lang %{name}
190
191 %clean
192 rm -rf $RPM_BUILD_ROOT
193
194 %post   -p /sbin/ldconfig
195 %postun -p /sbin/ldconfig
196
197 %post   libelf -p /sbin/ldconfig
198 %postun libelf -p /sbin/ldconfig
199
200 %files
201 %defattr(644,root,root,755)
202 %doc AUTHORS EXCEPTION NEWS NOTES README THANKS TODO
203 %attr(755,root,root) %{_bindir}/eu-*
204 %attr(755,root,root) %{_libdir}/libasm-*.so
205 %attr(755,root,root) %ghost %{_libdir}/libasm.so.*
206 %attr(755,root,root) %{_libdir}/libdw-*.so
207 %attr(755,root,root) %ghost %{_libdir}/libdw.so.*
208 %dir %{_libdir}/elfutils
209 %attr(755,root,root) %{_libdir}/elfutils/lib*.so
210 %{_mandir}/man1/eu-*.1*
211
212 %files devel
213 %defattr(644,root,root,755)
214 %attr(755,root,root) %{_libdir}/libasm.so
215 %attr(755,root,root) %{_libdir}/libdw.so
216 %attr(755,root,root) %{_libdir}/libelf.so
217 %{_libdir}/libebl.a
218 %{_includedir}/elfutils
219 %{_includedir}/dwarf.h
220 %{_includedir}/gelf.h
221 %{_includedir}/libelf.h
222 %{_includedir}/nlist.h
223
224 %files libelf -f %{name}.lang
225 %defattr(644,root,root,755)
226 %attr(755,root,root) /%{_lib}/libelf-*.so
227 %attr(755,root,root) %ghost /%{_lib}/libelf.so.*
228
229 %files static
230 %defattr(644,root,root,755)
231 %{_libdir}/libasm.a
232 %{_libdir}/libdw.a
233 %{_libdir}/libelf.a
This page took 0.114215 seconds and 3 git commands to generate.