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 %if "%{_alt_kernel}" != "%{nil}"
11 %undefine with_userspace
16 Summary: Core Analysis Suite
17 Summary(pl.UTF-8): Zestaw narzędzi do analizy zrzutów pamięci
18 Name: %{pname}%{_alt_kernel}
23 Source0: http://people.redhat.com/anderson/%{pname}-%{version}.tar.gz
24 # Source0-md5: b59076aebaced87e9073328cb0a4f50a
25 # git clone https://code.google.com/p/eppic
27 # Source1-md5: a9f80ad71de9d6f5b77534a7ebdbed8e
28 Patch0: %{pname}-format.patch
29 URL: http://people.redhat.com/anderson/
30 %if %{with kernel} && %{with dist_kernel}
31 BuildRequires: kernel-module-build >= 2.6
34 BuildRequires: ncurses-devel
35 BuildRequires: readline-devel
36 BuildRequires: xz-devel
37 BuildRequires: zlib-devel
39 ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc64 s390 s390x
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 The core analysis suite is a self-contained tool that can be used to
44 investigate either live systems, kernel core dumps created from the
45 netdump and diskdump packages offered by Red Hat, the LKCD kernel
46 patch or the mcore kernel patch available from Mission Critical Linux.
48 %description -l pl.UTF-8
49 Narzędzie do analizy zrzutów pamięci to samodzielny program służący do
50 badania systemów działających, zrzutów pamięci jądra utworzonych przez
51 pakiety Red Hata netdump lub diskdump, łatę jądra LKCD lub łatę jądra
52 mcore dostępną w Mission Critical Linuksie.
55 Summary: Header files for core analysis suite
56 Summary(pl.UTF-8): Plik nagłówkowy narzędzia do analizy zrzutów pamięci
57 Group: Development/Libraries
58 # doesn't require base
61 Header files for core analysis suite.
63 %description devel -l pl.UTF-8
64 Plik nagłówkowy narzędzia do analizy zrzutów pamięci.
66 %package -n kernel%{_alt_kernel}-char-crash
67 Summary: Memory driver for live system crash sessions
68 Summary(pl.UTF-8): Sterownik pamięci dla sesji crash na żywym systemie
69 Release: %{rel}@%{_kernel_ver_str}
71 Requires(post,postun): /sbin/depmod
72 %if %{with dist_kernel}
73 %requires_releq_kernel
74 Requires(postun): %releq_kernel
77 %description -n kernel%{_alt_kernel}-char-crash
78 This package contains /dev/crash memory driver for live system crash
79 sessions, which may be used when /dev/mem and /proc/kcore are
82 %description -n kernel%{_alt_kernel}-char-crash -l pl.UTF-8
83 Ten pakiet zawiera sterownik pamięci /dev/crash do sesji crash na
84 żywym systemie. Może być używany do analizy, kiedy /dev/mem i
85 /proc/kcore nie są dostępne.
88 %setup -q -a1 -n %{pname}-%{version}
91 %{__mv} eppic extensions
95 %build_kernel_modules -C memory_driver -m crash
99 export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses"
100 %{__make} -j1 all extensions \
101 ARCH="%{_target_cpu}" \
103 CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
107 rm -rf $RPM_BUILD_ROOT
110 %install_kernel_modules -m memory_driver/crash -d kernel/drivers/char
113 %if %{with userspace}
114 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man8,%{_libdir}/crash/extensions,%{_includedir}/crash}
117 DESTDIR=$RPM_BUILD_ROOT
119 # omitted by make install
120 install extensions/*.so $RPM_BUILD_ROOT%{_libdir}/crash/extensions
121 cp -p crash.8 $RPM_BUILD_ROOT%{_mandir}/man8
122 cp -p defs.h $RPM_BUILD_ROOT%{_includedir}/crash
126 rm -rf $RPM_BUILD_ROOT
128 %post -n kernel%{_alt_kernel}-char-crash
129 %depmod %{_kernel_ver}
131 %postun -n kernel%{_alt_kernel}-char-crash
132 %depmod %{_kernel_ver}
134 %if %{with userspace}
136 %defattr(644,root,root,755)
138 %attr(755,root,root) %{_bindir}/crash
139 %dir %{_libdir}/crash
140 %dir %{_libdir}/crash/extensions
141 %attr(755,root,root) %{_libdir}/crash/extensions/dminfo.so
142 %attr(755,root,root) %{_libdir}/crash/extensions/echo.so
143 %attr(755,root,root) %{_libdir}/crash/extensions/eppic.so
144 %attr(755,root,root) %{_libdir}/crash/extensions/snap.so
145 %attr(755,root,root) %{_libdir}/crash/extensions/trace.so
146 %{_mandir}/man8/crash.8*
149 %defattr(644,root,root,755)
154 %files -n kernel%{_alt_kernel}-char-crash
155 %defattr(644,root,root,755)
156 %doc memory_driver/README
157 /lib/modules/%{_kernel_ver}/kernel/drivers/char/crash.ko*