]> git.pld-linux.org Git - packages/crash.git/blob - crash.spec
- build memory driver
[packages/crash.git] / crash.spec
1 # TODO:
2 # - libeppic if anything else (but crash extension) wants to use it
3 #
4 # Conditional build:
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)
9 #
10 Summary:        Core Analysis Suite
11 Summary(pl.UTF-8):      Zestaw narzędzi do analizy zrzutów pamięci
12 Name:           crash
13 Version:        7.0.1
14 Release:        1
15 License:        GPL v2+
16 Group:          Libraries
17 Source0:        http://people.redhat.com/anderson/%{name}-%{version}.tar.gz
18 # Source0-md5:  b59076aebaced87e9073328cb0a4f50a
19 # git clone https://code.google.com/p/eppic
20 Source1:        eppic.tar.xz
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
25 %endif
26 %if %{with userspace}
27 BuildRequires:  ncurses-devel
28 BuildRequires:  readline-devel
29 BuildRequires:  xz-devel
30 BuildRequires:  zlib-devel
31 %endif
32 ExclusiveArch:  %{ix86} %{x8664} alpha arm ia64 ppc64 s390 s390x
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
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.
40
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.
46
47 %package devel
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
52
53 %description devel
54 Header files for core analysis suite.
55
56 %description devel -l pl.UTF-8
57 Plik nagłówkowy narzędzia do analizy zrzutów pamięci.
58
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}
63 Group:          Base/Kernel
64 Requires(post,postun):  /sbin/depmod
65 %if %{with dist_kernel}
66 %requires_releq_kernel
67 Requires(postun):       %releq_kernel
68 %endif
69
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
73 unavailable.
74
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.
79
80 %prep
81 %setup -q -a1
82
83 %{__mv} eppic extensions
84
85 %build
86 %if %{with kernel}
87 %build_kernel_modules -C memory_driver -m crash
88 %endif
89
90 %if %{with userspace}
91 export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses"
92 %{__make} -j1 all extensions \
93         ARCH="%{_target_cpu}" \
94         CC="%{__cc}" \
95         CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
96 %endif
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100
101 %if %{with kernel}
102 %install_kernel_modules -m memory_driver/crash -d kernel/drivers/char
103 %endif
104
105 %if %{with userspace}
106 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man8,%{_libdir}/crash/extensions,%{_includedir}/crash}
107
108 %{__make} install \
109         DESTDIR=$RPM_BUILD_ROOT
110
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
115 %endif
116
117 %clean
118 rm -rf $RPM_BUILD_ROOT
119
120 %post   -n kernel%{_alt_kernel}-char-crash
121 %depmod %{_kernel_ver}
122
123 %postun -n kernel%{_alt_kernel}-char-crash
124 %depmod %{_kernel_ver}
125
126 %if %{with userspace}
127 %files
128 %defattr(644,root,root,755)
129 %doc README
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*
139
140 %files devel
141 %defattr(644,root,root,755)
142 %{_includedir}/crash
143 %endif
144
145 %if %{with kernel}
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*
150 %endif
This page took 0.065289 seconds and 4 git commands to generate.