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