]> git.pld-linux.org Git - packages/elfutils.git/blob - elfutils.spec
separate libs and tools; rel 2
[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.170
9 Release:        2
10 License:        GPL v2+ or LGPL v3+ (libraries), GPL v3+ (programs)
11 Group:          Development/Tools
12 Source0:        https://sourceware.org/elfutils/ftp/%{version}/%{name}-%{version}.tar.bz2
13 # Source0-md5:  03599aee98c9b726c7a732a2dd0245d5
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}-maps.patch
21 # https://sourceware.org/git/?p=elfutils.git;a=patch;h=8f0140ace401197beaed1df6a48f259756d8bbd9
22 Patch7:         %{name}-tests.patch
23 URL:            https://sourceware.org/elfutils/
24 BuildRequires:  autoconf >= 2.63
25 BuildRequires:  automake >= 1:1.11
26 BuildRequires:  bzip2-devel
27 BuildRequires:  gawk
28 BuildRequires:  gcc >= 6:4.3
29 BuildRequires:  gettext-tools
30 BuildRequires:  glibc-devel >= 6:2.7
31 BuildRequires:  libstdc++-devel
32 BuildRequires:  perl-tools-pod
33 BuildRequires:  rpmbuild(macros) >= 1.315
34 BuildRequires:  sharutils
35 BuildRequires:  xz-devel
36 BuildRequires:  zlib-devel
37 %if %{with tests} && %(test -d /proc/self ; echo $?)
38 # native test needs proc (for libdwfl -p PID to work)
39 BuildRequires:  MOUNTED_PROC
40 %endif
41 Requires:       %{name}-libelf = %{version}-%{release}
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 # fails to build with -Wl,-s
45 %define         filterout_ld    (-Wl,)?-[sS] (-Wl,)?--strip.*
46 %if %{with tests} && 0%(echo %{rpmcflags} | grep -q '\<-g' ; echo $?)
47 # tests require debug symbols
48 %define         specflags       -g
49 %endif
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 Requires:       bzip2-devel
77 Requires:       xz-devel
78 Requires:       zlib-devel
79 Obsoletes:      libelf-devel
80
81 %description devel
82 The elfutils-devel package contains the development part of libraries
83 to create applications for handling compiled objects. libelf allows
84 you to access the internals of the ELF object file format, so you can
85 see the different sections of an ELF file. libebl provides some
86 higher-level ELF access functionality. libdwarf provides access to the
87 DWARF debugging information. libasm provides a programmable assembler
88 interface.
89
90 %description devel -l pl.UTF-8
91 Pakiet elfutils-devel zawiera część programistyczną bibliotek do
92 tworzenia aplikacji obsługujących skompilowane obiekty. libelf pozwala
93 na dostęp do wnętrzności formatu pliku obiektowego ELF, co pozwala na
94 oglądanie różnych sekcji pliku ELF. libebl udostępnia funkcjonalność
95 dostępu do plików ELF trochę wyższego poziomu. libdwarf pozwala na
96 dostęp do informacji DWARF służących do odpluskwiania. libasm
97 udostępnia programowalny interfejs asemblera.
98
99 %package libelf
100 Summary:        Library to read and write ELF files
101 Summary(pl.UTF-8):      Biblioteki do odczytu i zapisu plików ELF
102 Group:          Libraries
103 #Obsoletes:     libelf
104
105 %description libelf
106 The elfutils-libelf package provides a DSO which allows reading and
107 writing ELF files on a high level. Third party programs depend on this
108 package to read internals of ELF files. The programs of the elfutils
109 package use it also to generate new ELF files.
110
111 %description libelf -l pl.UTF-8
112 Pakiet elfutils-libelf udostępnia bibliotekę dzieloną, która pozwala
113 na wysokopoziomowe czytanie i zapisywanie plików ELF. Inne programy
114 wymagają tego pakietu, aby odczytywać zawartość plików ELF. Programy z
115 pakietu elfutils używają jej także do generowania nowych plików ELF.
116
117 %package static
118 Summary:        Static libraries to handle compiled objects
119 Summary(pl.UTF-8):      Statyczne biblioteki do obsługi skompilowanych obiektów
120 Group:          Development/Libraries
121 Requires:       %{name}-devel = %{version}-%{release}
122 Obsoletes:      libelf-static
123
124 %description static
125 The elfutils-static package contains the static libraries to create
126 applications for handling compiled objects. libelf allows you to
127 access the internals of the ELF object file format, so you can see the
128 different sections of an ELF file. libebl provides some higher-level
129 ELF access functionality. libdwarf provides access to the DWARF
130 debugging information. libasm provides a programmable assembler
131 interface.
132
133 %description static -l pl.UTF-8
134 Pakiet elfutils-static zawiera statyczne biblioteki do tworzenia
135 aplikacji obsługujących skompilowane obiekty. libelf pozwala na dostęp
136 do wnętrzności formatu pliku obiektowego ELF, co pozwala na oglądanie
137 różnych sekcji pliku ELF. libebl udostępnia funkcjonalność dostępu do
138 plików ELF trochę wyższego poziomu. libdwarf pozwala na dostęp do
139 informacji DWARF służących do odpluskwiania. libasm udostępnia
140 programowalny interfejs asemblera.
141
142 %prep
143 %setup -q
144 %patch0 -p1
145 %patch1 -p1
146 %patch2 -p1
147 %patch3 -p1
148 %patch4 -p1
149 %patch5 -p1
150 %patch6 -p1
151 %patch7 -p1
152
153 %{__rm} po/stamp-po
154
155 # temporarily disable failing tests (depending or arch)
156 %ifarch x32
157 %{__sed} -i -e 's/run-backtrace-native-biarch.sh//' tests/Makefile.am
158 %endif
159
160 %build
161 #%%{__gettextize}
162 %{__aclocal} -I m4
163 %{__autoheader}
164 %{__autoconf}
165 %{__automake}
166 %configure \
167         --disable-silent-rules \
168         --disable-werror \
169         --program-prefix=%{programprefix}
170
171 # make check depends on test-nlist not stripped
172 %{__perl} -pi -e 's/^(LDFLAGS =.*)-s/$1/' tests/Makefile
173
174 %{__make}
175 %{__make} -C debian/man
176
177 %if %{with tests}
178 # some tests rely on English messages
179 LC_ALL=C \
180 %{__make} -C tests check
181 %endif
182
183 %install
184 rm -rf $RPM_BUILD_ROOT
185 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,/%{_lib}}
186
187 %{__make} install \
188         DESTDIR=$RPM_BUILD_ROOT
189
190 install debian/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1
191
192 %{__mv} $RPM_BUILD_ROOT%{_libdir}/{libelf-*.so,libelf.so.*} $RPM_BUILD_ROOT/%{_lib}
193 ln -sf /%{_lib}/$(basename $RPM_BUILD_ROOT/%{_lib}/libelf-*.so) \
194         $RPM_BUILD_ROOT%{_libdir}/libelf.so
195
196 %find_lang %{name}
197
198 %clean
199 rm -rf $RPM_BUILD_ROOT
200
201 %post   -p /sbin/ldconfig
202 %postun -p /sbin/ldconfig
203
204 %post   libelf -p /sbin/ldconfig
205 %postun libelf -p /sbin/ldconfig
206
207 %files
208 %defattr(644,root,root,755)
209 %doc AUTHORS CONTRIBUTING ChangeLog NEWS NOTES README THANKS TODO
210 %attr(755,root,root) %{_bindir}/eu-*
211 %attr(755,root,root) %{_libdir}/libasm-*.so
212 %attr(755,root,root) %ghost %{_libdir}/libasm.so.1
213 %attr(755,root,root) %{_libdir}/libdw-*.so
214 %attr(755,root,root) %ghost %{_libdir}/libdw.so.1
215 %dir %{_libdir}/elfutils
216 %attr(755,root,root) %{_libdir}/elfutils/lib*.so
217 %{_mandir}/man1/eu-*.1*
218
219 %files devel
220 %defattr(644,root,root,755)
221 %attr(755,root,root) %{_libdir}/libasm.so
222 %attr(755,root,root) %{_libdir}/libdw.so
223 %attr(755,root,root) %{_libdir}/libelf.so
224 %{_libdir}/libebl.a
225 %{_includedir}/elfutils
226 %{_includedir}/dwarf.h
227 %{_includedir}/gelf.h
228 %{_includedir}/libelf.h
229 %{_includedir}/nlist.h
230 %{_pkgconfigdir}/libdw.pc
231 %{_pkgconfigdir}/libelf.pc
232
233 %files libelf -f %{name}.lang
234 %defattr(644,root,root,755)
235 %attr(755,root,root) /%{_lib}/libelf-*.so
236 %attr(755,root,root) %ghost /%{_lib}/libelf.so.1
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.04996 seconds and 3 git commands to generate.