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