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