2 # - libeppic if anything else (but crash extension) wants to use it
5 %bcond_without dist_kernel # allow non-distribution kernel
6 %bcond_without kernel # don't build kernel modules
7 %bcond_without userspace # don't build userspace programs
8 %bcond_with verbose # verbose kernel module build (V=1)
10 Summary: Core Analysis Suite
11 Summary(pl.UTF-8): Zestaw narzędzi do analizy zrzutów pamięci
17 Source0: http://people.redhat.com/anderson/%{name}-%{version}.tar.gz
18 # Source0-md5: b59076aebaced87e9073328cb0a4f50a
19 # git clone https://code.google.com/p/eppic
21 # Source1-md5: a9f80ad71de9d6f5b77534a7ebdbed8e
22 Patch0: %{name}-format.patch
23 URL: http://people.redhat.com/anderson/
24 %if %{with kernel} && %{with dist_kernel}
25 BuildRequires: kernel-module-build >= 2.6
28 BuildRequires: ncurses-devel
29 BuildRequires: readline-devel
30 BuildRequires: xz-devel
31 BuildRequires: zlib-devel
33 ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc64 s390 s390x
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 The core analysis suite is a self-contained tool that can be used to
38 investigate either live systems, kernel core dumps created from the
39 netdump and diskdump packages offered by Red Hat, the LKCD kernel
40 patch or the mcore kernel patch available from Mission Critical Linux.
42 %description -l pl.UTF-8
43 Narzędzie do analizy zrzutów pamięci to samodzielny program służący do
44 badania systemów działających, zrzutów pamięci jądra utworzonych przez
45 pakiety Red Hata netdump lub diskdump, łatę jądra LKCD lub łatę jądra
46 mcore dostępną w Mission Critical Linuksie.
49 Summary: Header files for core analysis suite
50 Summary(pl.UTF-8): Plik nagłówkowy narzędzia do analizy zrzutów pamięci
51 Group: Development/Libraries
52 # doesn't require base
55 Header files for core analysis suite.
57 %description devel -l pl.UTF-8
58 Plik nagłówkowy narzędzia do analizy zrzutów pamięci.
60 %package -n kernel%{_alt_kernel}-char-crash
61 Summary: Memory driver for live system crash sessions
62 Summary(pl.UTF-8): Sterownik pamięci dla sesji crash na żywym systemie
63 Release: %{release}@%{_kernel_ver_str}
65 Requires(post,postun): /sbin/depmod
66 %if %{with dist_kernel}
67 %requires_releq_kernel
68 Requires(postun): %releq_kernel
71 %description -n kernel%{_alt_kernel}-char-crash
72 This package contains /dev/crash memory driver for live system crash
73 sessions, which may be used when /dev/mem and /proc/kcore are
76 %description -n kernel%{_alt_kernel}-char-crash -l pl.UTF-8
77 Ten pakiet zawiera sterownik pamięci /dev/crash do sesji crash na
78 żywym systemie. Może być używany do analizy, kiedy /dev/mem i
79 /proc/kcore nie są dostępne.
85 %{__mv} eppic extensions
89 %build_kernel_modules -C memory_driver -m crash
93 export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses"
94 %{__make} -j1 all extensions \
95 ARCH="%{_target_cpu}" \
97 CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
101 rm -rf $RPM_BUILD_ROOT
104 %install_kernel_modules -m memory_driver/crash -d kernel/drivers/char
107 %if %{with userspace}
108 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man8,%{_libdir}/crash/extensions,%{_includedir}/crash}
111 DESTDIR=$RPM_BUILD_ROOT
113 # omitted by make install
114 install extensions/*.so $RPM_BUILD_ROOT%{_libdir}/crash/extensions
115 cp -p crash.8 $RPM_BUILD_ROOT%{_mandir}/man8
116 cp -p defs.h $RPM_BUILD_ROOT%{_includedir}/crash
120 rm -rf $RPM_BUILD_ROOT
122 %post -n kernel%{_alt_kernel}-char-crash
123 %depmod %{_kernel_ver}
125 %postun -n kernel%{_alt_kernel}-char-crash
126 %depmod %{_kernel_ver}
128 %if %{with userspace}
130 %defattr(644,root,root,755)
132 %attr(755,root,root) %{_bindir}/crash
133 %dir %{_libdir}/crash
134 %dir %{_libdir}/crash/extensions
135 %attr(755,root,root) %{_libdir}/crash/extensions/dminfo.so
136 %attr(755,root,root) %{_libdir}/crash/extensions/echo.so
137 %attr(755,root,root) %{_libdir}/crash/extensions/eppic.so
138 %attr(755,root,root) %{_libdir}/crash/extensions/snap.so
139 %attr(755,root,root) %{_libdir}/crash/extensions/trace.so
140 %{_mandir}/man8/crash.8*
143 %defattr(644,root,root,755)
148 %files -n kernel%{_alt_kernel}-char-crash
149 %defattr(644,root,root,755)
150 %doc memory_driver/README
151 /lib/modules/%{_kernel_ver}/kernel/drivers/char/crash.ko*