]> git.pld-linux.org Git - packages/elfutils.git/blob - elfutils.spec
00c0966c9286ff4a488f39343c6bcb4a0b162299
[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):    Zestaw narzêdzi i bibliotek do obs³ugi skompilowanych obiektów
7 Name:           elfutils
8 Version:        0.122
9 Release:        1
10 License:        OSL 1.0 (http://www.opensource.org/licenses/osl.php)
11 Group:          Development/Tools
12 # http://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/
13 # abuse systemtap to get .tar.gz directly
14 Source0:        ftp://sources.redhat.com/pub/systemtap/elfutils/%{name}-%{version}.tar.gz
15 # Source0-md5:  d83e9022eb342eede549dd6d6a537b59
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}-cast.patch
24 #URL:           file://home/devel/drepper
25 BuildRequires:  autoconf >= 2.59
26 BuildRequires:  automake >= 1:1.7
27 BuildRequires:  gcc >= 3.2
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:  libltdl-devel
35 BuildRequires:  perl-tools-pod
36 BuildRequires:  rpmbuild(macros) >= 1.315
37 BuildRequires:  sharutils
38 Requires:       %{name}-libelf = %{version}-%{release}
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 # fails to build with -Wl,-s
42 %define         filterout_ld    (-Wl,)?-[sS] (-Wl,)?--strip.*
43
44 %define         _programprefix  eu-
45
46 %description
47 Elfutils is a collection of utilities, including ld (a linker), nm
48 (for listing symbols from object files), size (for listing the section
49 sizes of an object or archive file), strip (for discarding symbols),
50 readline (the see the raw ELF file structures), and elflint (to check
51 for well-formed ELF files). Also included are numerous helper
52 libraries which implement DWARF, ELF, and machine-specific ELF
53 handling.
54
55 %description -l pl
56 Elfutils to zestaw narzêdzi, sk³adaj±cy siê z ld (linkera), nm (do
57 listowania symboli z plików obiektów), size (do listowania rozmiarów
58 sekcji plików obiektów lub archiwów), strip (do usuwania symboli),
59 readline (do ogl±dania surowych struktur plików ELF) oraz elflint (do
60 sprawdzania poprawno¶ci plików ELF). Do³±czone s± tak¿e liczne
61 biblioteki pomocnicze z zaimplementowan± obs³ug± DWARF, ELF i ELF
62 specyficznych dla architektury.
63
64 %package devel
65 Summary:        Development part of libraries to handle compiled objects
66 Summary(pl):    Czê¶æ programistyczna bibliotek do obs³ugi skompilowanych obiektów
67 Group:          Development/Libraries
68 Requires:       %{name} = %{version}-%{release}
69 Obsoletes:      libelf-devel
70
71 %description devel
72 The elfutils-devel package contains the development part of libraries
73 to create applications for handling compiled objects. libelf allows
74 you to access the internals of the ELF object file format, so you can
75 see the different sections of an ELF file. libebl provides some
76 higher-level ELF access functionality. libdwarf provides access to the
77 DWARF debugging information. libasm provides a programmable assembler
78 interface.
79
80 %description devel -l pl
81 Pakiet elfutils-devel zawiera czê¶æ programistyczn± bibliotek do
82 tworzenia aplikacji obs³uguj±cych skompilowane obiekty. libelf pozwala
83 na dostêp do wnêtrzno¶ci formatu pliku obiektowego ELF, co pozwala na
84 ogl±danie ró¿nych sekcji pliku ELF. libebl udostêpnia funkcjonalno¶æ
85 dostêpu do plików ELF trochê wy¿szego poziomu. libdwarf pozwala na
86 dostêp do informacji DWARF s³u¿±cych do odpluskwiania. libasm
87 udostêpnia programowalny interfejs asemblera.
88
89 %package libelf
90 Summary:        Library to read and write ELF files
91 Summary(pl):    Biblioteki do odczytu i zapisu plików ELF
92 Group:          Libraries
93 #Obsoletes:     libelf
94
95 %description libelf
96 The elfutils-libelf package provides a DSO which allows reading and
97 writing ELF files on a high level. Third party programs depend on this
98 package to read internals of ELF files. The programs of the elfutils
99 package use it also to generate new ELF files.
100
101 %description libelf -l pl
102 Pakiet elfutils-libelf udostêpnia bibliotekê dzielon±, która pozwala
103 na wysokopoziomowe czytanie i zapisywanie plików ELF. Inne programy
104 wymagaj± tego pakietu, aby odczytywaæ zawarto¶æ plików ELF. Programy z
105 pakietu elfutils u¿ywaj± jej tak¿e do generowania nowych plików ELF.
106
107 %package static
108 Summary:        Static libraries to handle compiled objects
109 Summary(pl):    Statyczne biblioteki do obs³ugi skompilowanych obiektów
110 Group:          Development/Libraries
111 Requires:       %{name}-devel = %{version}-%{release}
112 Obsoletes:      libelf-static
113
114 %description static
115 The elfutils-static package contains the static libraries to create
116 applications for handling compiled objects. libelf allows you to
117 access the internals of the ELF object file format, so you can see the
118 different sections of an ELF file. libebl provides some higher-level
119 ELF access functionality. libdwarf provides access to the DWARF
120 debugging information. libasm provides a programmable assembler
121 interface.
122
123 %description static -l pl
124 Pakiet elfutils-static zawiera statyczne biblioteki do tworzenia
125 aplikacji obs³uguj±cych skompilowane obiekty. libelf pozwala na dostêp
126 do wnêtrzno¶ci formatu pliku obiektowego ELF, co pozwala na ogl±danie
127 ró¿nych sekcji pliku ELF. libebl udostêpnia funkcjonalno¶æ dostêpu do
128 plików ELF trochê wy¿szego poziomu. libdwarf pozwala na dostêp do
129 informacji DWARF s³u¿±cych do odpluskwiania. libasm udostêpnia
130 programowalny interfejs asemblera.
131
132 %prep
133 %setup -q
134 %patch0 -p1
135 %patch1 -p1
136 %patch2 -p1
137 %patch3 -p1
138 %patch4 -p1
139 %patch5 -p1
140 %patch6 -p1
141 %patch7 -p0
142
143 %build
144 #%%{__gettextize}
145 %{__aclocal}
146 %{__autoheader}
147 %{__automake}
148 %{__autoconf}
149
150 %configure \
151         --program-prefix=%{_programprefix} \
152         --enable-shared
153
154 # make check depends on test-nlist not stripped
155 %{__perl} -pi -e 's/^(LDFLAGS =.*)-s/$1/' tests/Makefile
156
157 %{__make}
158 %{__make} -C debian/man
159 %if %{with tests}
160 # $ORIGIN used in RPATH needs /proc to work - workaround it using LD_LIBRARY_PATH;
161 # ../libelf is needed also to use proper libelf by ../src/elflint during tests
162 LD_LIBRARY_PATH=../libasm:../libdw:../libebl:../libelf \
163 %{__make} -C tests check
164 %endif
165
166 %install
167 rm -rf $RPM_BUILD_ROOT
168 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,/%{_lib}}
169
170 # *OBJEXT must be passed to workaround problem with messed gettext,
171 # which doesn't like *-po dir names
172 %{__make} install \
173         DESTDIR=$RPM_BUILD_ROOT \
174         MKINSTALLDIRS=$(pwd)/config/mkinstalldirs \
175         CATOBJEXT=.gmo \
176         INSTOBJEXT=.mo
177
178 install debian/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
179
180 mv $RPM_BUILD_ROOT%{_libdir}/libelf-*.so $RPM_BUILD_ROOT/%{_lib}
181 ln -sf /%{_lib}/$(cd $RPM_BUILD_ROOT/%{_lib} ; echo libelf-*.so) \
182         $RPM_BUILD_ROOT%{_libdir}/libelf.so
183
184 %find_lang libelf
185 %find_lang %{name}
186
187 %clean
188 rm -rf $RPM_BUILD_ROOT
189
190 %post   -p /sbin/ldconfig
191 %postun -p /sbin/ldconfig
192
193 %post   libelf -p /sbin/ldconfig
194 %postun libelf -p /sbin/ldconfig
195
196 %files -f %{name}.lang
197 %defattr(644,root,root,755)
198 %doc AUTHORS COPYING NEWS NOTES README THANKS TODO
199 %attr(755,root,root) %{_bindir}/*
200 %attr(755,root,root) %{_libdir}/libasm-*.so
201 %attr(755,root,root) %{_libdir}/libdw-*.so
202 %dir %{_libdir}/elfutils
203 %attr(755,root,root) %{_libdir}/elfutils/lib*.so
204 %{_mandir}/man1/*.1*
205
206 %files devel
207 %defattr(644,root,root,755)
208 %attr(755,root,root) %{_libdir}/libasm.so
209 %attr(755,root,root) %{_libdir}/libdw.so
210 %attr(755,root,root) %{_libdir}/libelf.so
211 %{_libdir}/libebl.a
212 %{_includedir}/*
213
214 %files libelf -f libelf.lang
215 %defattr(644,root,root,755)
216 %attr(755,root,root) /%{_lib}/libelf-*.so
217
218 %files static
219 %defattr(644,root,root,755)
220 %{_libdir}/libasm.a
221 %{_libdir}/libdw.a
222 %{_libdir}/libelf.a
This page took 0.076227 seconds and 2 git commands to generate.