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