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 URL: http://people.redhat.com/anderson/
23 %if %{with kernel} && %{with dist_kernel}
24 BuildRequires: kernel-module-build >= 2.6
27 BuildRequires: ncurses-devel
28 BuildRequires: readline-devel
29 BuildRequires: xz-devel
30 BuildRequires: zlib-devel
32 ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc64 s390 s390x
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 The core analysis suite is a self-contained tool that can be used to
37 investigate either live systems, kernel core dumps created from the
38 netdump and diskdump packages offered by Red Hat, the LKCD kernel
39 patch or the mcore kernel patch available from Mission Critical Linux.
41 %description -l pl.UTF-8
42 Narzędzie do analizy zrzutów pamięci to samodzielny program służący do
43 badania systemów działających, zrzutów pamięci jądra utworzonych przez
44 pakiety Red Hata netdump lub diskdump, łatę jądra LKCD lub łatę jądra
45 mcore dostępną w Mission Critical Linuksie.
48 Summary: Header files for core analysis suite
49 Summary(pl.UTF-8): Plik nagłówkowy narzędzia do analizy zrzutów pamięci
50 Group: Development/Libraries
51 # doesn't require base
54 Header files for core analysis suite.
56 %description devel -l pl.UTF-8
57 Plik nagłówkowy narzędzia do analizy zrzutów pamięci.
59 %package -n kernel%{_alt_kernel}-char-crash
60 Summary: Memory driver for live system crash sessions
61 Summary(pl.UTF-8): Sterownik pamięci dla sesji crash na żywym systemie
62 Release: %{release}@%{_kernel_ver_str}
64 Requires(post,postun): /sbin/depmod
65 %if %{with dist_kernel}
66 %requires_releq_kernel
67 Requires(postun): %releq_kernel
70 %description -n kernel%{_alt_kernel}-char-crash
71 This package contains /dev/crash memory driver for live system crash
72 sessions, which may be used when /dev/mem and /proc/kcore are
75 %description -n kernel%{_alt_kernel}-char-crash -l pl.UTF-8
76 Ten pakiet zawiera sterownik pamięci /dev/crash do sesji crash na
77 żywym systemie. Może być używany do analizy, kiedy /dev/mem i
78 /proc/kcore nie są dostępne.
83 %{__mv} eppic extensions
87 %build_kernel_modules -C memory_driver -m crash
91 export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses"
92 %{__make} -j1 all extensions \
93 ARCH="%{_target_cpu}" \
95 CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
99 rm -rf $RPM_BUILD_ROOT
102 %install_kernel_modules -m memory_driver/crash -d kernel/drivers/char
105 %if %{with userspace}
106 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man8,%{_libdir}/crash/extensions,%{_includedir}/crash}
109 DESTDIR=$RPM_BUILD_ROOT
111 # omitted by make install
112 install extensions/*.so $RPM_BUILD_ROOT%{_libdir}/crash/extensions
113 cp -p crash.8 $RPM_BUILD_ROOT%{_mandir}/man8
114 cp -p defs.h $RPM_BUILD_ROOT%{_includedir}/crash
118 rm -rf $RPM_BUILD_ROOT
120 %post -n kernel%{_alt_kernel}-char-crash
121 %depmod %{_kernel_ver}
123 %postun -n kernel%{_alt_kernel}-char-crash
124 %depmod %{_kernel_ver}
126 %if %{with userspace}
128 %defattr(644,root,root,755)
130 %attr(755,root,root) %{_bindir}/crash
131 %dir %{_libdir}/crash
132 %dir %{_libdir}/crash/extensions
133 %attr(755,root,root) %{_libdir}/crash/extensions/dminfo.so
134 %attr(755,root,root) %{_libdir}/crash/extensions/echo.so
135 %attr(755,root,root) %{_libdir}/crash/extensions/eppic.so
136 %attr(755,root,root) %{_libdir}/crash/extensions/snap.so
137 %attr(755,root,root) %{_libdir}/crash/extensions/trace.so
138 %{_mandir}/man8/crash.8*
141 %defattr(644,root,root,755)
146 %files -n kernel%{_alt_kernel}-char-crash
147 %defattr(644,root,root,755)
148 %doc memory_driver/README
149 /lib/modules/%{_kernel_ver}/kernel/drivers/char/crash.ko*