]> git.pld-linux.org Git - packages/elfutils.git/blob - elfutils.spec
92a940f5b3ae9520dd32ed570edaa5d620d8e83c
[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.164
9 Release:        1
10 License:        GPL v2+ or LGPL v3+ (libraries), GPL v3+ (programs)
11 Group:          Development/Tools
12 Source0:        https://fedorahosted.org/releases/e/l/elfutils/%{version}/%{name}-%{version}.tar.bz2
13 # Source0-md5:  2e4536c1c48034f188a80789a59114d8
14 Patch0:         %{name}-pl.po.patch
15 Patch1:         %{name}-debian-manpages.patch
16 Patch2:         %{name}-awk.patch
17 Patch3:         %{name}-align.patch
18 Patch4:         %{name}-paxflags.patch
19 Patch5:         %{name}-sparc.patch
20 Patch6:         %{name}-inline.patch
21 Patch9:         x32.patch
22 URL:            https://fedorahosted.org/elfutils/
23 BuildRequires:  autoconf >= 2.63
24 BuildRequires:  automake >= 1:1.8
25 BuildRequires:  gawk
26 BuildRequires:  gcc >= 6:4.3
27 BuildRequires:  gettext-tools
28 BuildRequires:  glibc-devel >= 6:2.7
29 BuildRequires:  perl-tools-pod
30 BuildRequires:  rpmbuild(macros) >= 1.315
31 BuildRequires:  sharutils
32 %if %{with tests} && %(test -d /proc/self ; echo $?)
33 # native test needs proc (for libdwfl -p PID to work)
34 BuildRequires:  MOUNTED_PROC
35 %endif
36 Requires:       %{name}-libelf = %{version}-%{release}
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 # fails to build with -Wl,-s
40 %define         filterout_ld    (-Wl,)?-[sS] (-Wl,)?--strip.*
41 %if %{with tests} && 0%(echo %{rpmcflags} | grep -q '\<-g' ; echo $?)
42 # tests require debug symbols
43 %define         specflags       -g
44 %endif
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 #%ifarch x32
144 #%patch9 -p1
145 #%endif
146
147 %{__rm} po/stamp-po
148
149 # temporarily disable failing tests (depending or arch)
150 #%{__sed} -i -e 's/run-elflint-self.sh//' tests/Makefile.am
151
152 %build
153 #%%{__gettextize}
154 %{__aclocal} -I m4
155 %{__autoheader}
156 %{__autoconf}
157 %{__automake}
158 %configure \
159         --disable-silent-rules \
160         --disable-werror \
161         --program-prefix=%{programprefix}
162
163 # make check depends on test-nlist not stripped
164 %{__perl} -pi -e 's/^(LDFLAGS =.*)-s/$1/' tests/Makefile
165
166 %{__make}
167 %{__make} -C debian/man
168
169 %if %{with tests}
170 # some tests rely on English messages
171 LC_ALL=C \
172 %{__make} -C tests check
173 %endif
174
175 %install
176 rm -rf $RPM_BUILD_ROOT
177 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,/%{_lib}}
178
179 %{__make} install \
180         DESTDIR=$RPM_BUILD_ROOT
181
182 install debian/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
183
184 %{__mv} $RPM_BUILD_ROOT%{_libdir}/{libelf-*.so,libelf.so.*} $RPM_BUILD_ROOT/%{_lib}
185 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libelf-*.so) \
186         $RPM_BUILD_ROOT%{_libdir}/libelf.so
187
188 %find_lang %{name}
189
190 %clean
191 rm -rf $RPM_BUILD_ROOT
192
193 %post   -p /sbin/ldconfig
194 %postun -p /sbin/ldconfig
195
196 %post   libelf -p /sbin/ldconfig
197 %postun libelf -p /sbin/ldconfig
198
199 %files
200 %defattr(644,root,root,755)
201 %doc AUTHORS CONTRIBUTING ChangeLog NEWS NOTES README THANKS TODO
202 %attr(755,root,root) %{_bindir}/eu-*
203 %attr(755,root,root) %{_libdir}/libasm-*.so
204 %attr(755,root,root) %ghost %{_libdir}/libasm.so.1
205 %attr(755,root,root) %{_libdir}/libdw-*.so
206 %attr(755,root,root) %ghost %{_libdir}/libdw.so.1
207 %dir %{_libdir}/elfutils
208 %attr(755,root,root) %{_libdir}/elfutils/lib*.so
209 %{_mandir}/man1/eu-*.1*
210
211 %files devel
212 %defattr(644,root,root,755)
213 %attr(755,root,root) %{_libdir}/libasm.so
214 %attr(755,root,root) %{_libdir}/libdw.so
215 %attr(755,root,root) %{_libdir}/libelf.so
216 %{_libdir}/libebl.a
217 %{_includedir}/elfutils
218 %{_includedir}/dwarf.h
219 %{_includedir}/gelf.h
220 %{_includedir}/libelf.h
221 %{_includedir}/nlist.h
222
223 %files libelf -f %{name}.lang
224 %defattr(644,root,root,755)
225 %attr(755,root,root) /%{_lib}/libelf-*.so
226 %attr(755,root,root) %ghost /%{_lib}/libelf.so.1
227
228 %files static
229 %defattr(644,root,root,755)
230 %{_libdir}/libasm.a
231 %{_libdir}/libdw.a
232 %{_libdir}/libelf.a
This page took 0.140573 seconds and 2 git commands to generate.