]> git.pld-linux.org Git - packages/crash.git/blob - crash.spec
- rebuild for kernel-3.10.12-1
[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 %if "%{_alt_kernel}" != "%{nil}"
11 %undefine       with_userspace
12 %endif
13
14 %define         rel             7
15 %define         pname           crash
16 Summary:        Core Analysis Suite
17 Summary(pl.UTF-8):      Zestaw narzędzi do analizy zrzutów pamięci
18 Name:           %{pname}%{_alt_kernel}
19 Version:        7.0.1
20 Release:        %{rel}
21 License:        GPL v2+
22 Group:          Libraries
23 Source0:        http://people.redhat.com/anderson/%{pname}-%{version}.tar.gz
24 # Source0-md5:  b59076aebaced87e9073328cb0a4f50a
25 # git clone https://code.google.com/p/eppic
26 Source1:        eppic.tar.xz
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
32 %endif
33 %if %{with userspace}
34 BuildRequires:  ncurses-devel
35 BuildRequires:  readline-devel
36 BuildRequires:  xz-devel
37 BuildRequires:  zlib-devel
38 %endif
39 ExclusiveArch:  %{ix86} %{x8664} alpha arm ia64 ppc64 s390 s390x
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
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.
47
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.
53
54 %package devel
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
59
60 %description devel
61 Header files for core analysis suite.
62
63 %description devel -l pl.UTF-8
64 Plik nagłówkowy narzędzia do analizy zrzutów pamięci.
65
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}
70 Group:          Base/Kernel
71 Requires(post,postun):  /sbin/depmod
72 %if %{with dist_kernel}
73 %requires_releq_kernel
74 Requires(postun):       %releq_kernel
75 %endif
76
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
80 unavailable.
81
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.
86
87 %prep
88 %setup -q -a1 -n %{pname}-%{version}
89 %patch0 -p1
90
91 %{__mv} eppic extensions
92
93 %build
94 %if %{with kernel}
95 %build_kernel_modules -C memory_driver -m crash
96 %endif
97
98 %if %{with userspace}
99 export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses"
100 %{__make} -j1 all extensions \
101         ARCH="%{_target_cpu}" \
102         CC="%{__cc}" \
103         CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
104 %endif
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108
109 %if %{with kernel}
110 %install_kernel_modules -m memory_driver/crash -d kernel/drivers/char
111 %endif
112
113 %if %{with userspace}
114 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man8,%{_libdir}/crash/extensions,%{_includedir}/crash}
115
116 %{__make} install \
117         DESTDIR=$RPM_BUILD_ROOT
118
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
123 %endif
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128 %post   -n kernel%{_alt_kernel}-char-crash
129 %depmod %{_kernel_ver}
130
131 %postun -n kernel%{_alt_kernel}-char-crash
132 %depmod %{_kernel_ver}
133
134 %if %{with userspace}
135 %files
136 %defattr(644,root,root,755)
137 %doc README
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*
147
148 %files devel
149 %defattr(644,root,root,755)
150 %{_includedir}/crash
151 %endif
152
153 %if %{with kernel}
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*
158 %endif
This page took 0.043117 seconds and 4 git commands to generate.