]> git.pld-linux.org Git - packages/crash.git/blob - crash.spec
- added format patch (fixes build with -Werror=format-security)
[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 Patch0:         %{name}-format.patch
23 URL:            http://people.redhat.com/anderson/
24 %if %{with kernel} && %{with dist_kernel}
25 BuildRequires:  kernel-module-build >= 2.6
26 %endif
27 %if %{with userspace}
28 BuildRequires:  ncurses-devel
29 BuildRequires:  readline-devel
30 BuildRequires:  xz-devel
31 BuildRequires:  zlib-devel
32 %endif
33 ExclusiveArch:  %{ix86} %{x8664} alpha arm ia64 ppc64 s390 s390x
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 The core analysis suite is a self-contained tool that can be used to
38 investigate either live systems, kernel core dumps created from the
39 netdump and diskdump packages offered by Red Hat, the LKCD kernel
40 patch or the mcore kernel patch available from Mission Critical Linux.
41
42 %description -l pl.UTF-8
43 Narzędzie do analizy zrzutów pamięci to samodzielny program służący do
44 badania systemów działających, zrzutów pamięci jądra utworzonych przez
45 pakiety Red Hata netdump lub diskdump, łatę jądra LKCD lub łatę jądra
46 mcore dostępną w Mission Critical Linuksie.
47
48 %package devel
49 Summary:        Header files for core analysis suite
50 Summary(pl.UTF-8):      Plik nagłówkowy narzędzia do analizy zrzutów pamięci
51 Group:          Development/Libraries
52 # doesn't require base
53
54 %description devel
55 Header files for core analysis suite.
56
57 %description devel -l pl.UTF-8
58 Plik nagłówkowy narzędzia do analizy zrzutów pamięci.
59
60 %package -n kernel%{_alt_kernel}-char-crash
61 Summary:        Memory driver for live system crash sessions
62 Summary(pl.UTF-8):      Sterownik pamięci dla sesji crash na żywym systemie
63 Release:        %{release}@%{_kernel_ver_str}
64 Group:          Base/Kernel
65 Requires(post,postun):  /sbin/depmod
66 %if %{with dist_kernel}
67 %requires_releq_kernel
68 Requires(postun):       %releq_kernel
69 %endif
70
71 %description -n kernel%{_alt_kernel}-char-crash
72 This package contains /dev/crash memory driver for live system crash
73 sessions, which may be used when /dev/mem and /proc/kcore are
74 unavailable.
75
76 %description -n kernel%{_alt_kernel}-char-crash -l pl.UTF-8
77 Ten pakiet zawiera sterownik pamięci /dev/crash do sesji crash na
78 żywym systemie. Może być używany do analizy, kiedy /dev/mem i
79 /proc/kcore nie są dostępne.
80
81 %prep
82 %setup -q -a1
83 %patch0 -p1
84
85 %{__mv} eppic extensions
86
87 %build
88 %if %{with kernel}
89 %build_kernel_modules -C memory_driver -m crash
90 %endif
91
92 %if %{with userspace}
93 export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses"
94 %{__make} -j1 all extensions \
95         ARCH="%{_target_cpu}" \
96         CC="%{__cc}" \
97         CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
98 %endif
99
100 %install
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with kernel}
104 %install_kernel_modules -m memory_driver/crash -d kernel/drivers/char
105 %endif
106
107 %if %{with userspace}
108 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man8,%{_libdir}/crash/extensions,%{_includedir}/crash}
109
110 %{__make} install \
111         DESTDIR=$RPM_BUILD_ROOT
112
113 # omitted by make install
114 install extensions/*.so $RPM_BUILD_ROOT%{_libdir}/crash/extensions
115 cp -p crash.8 $RPM_BUILD_ROOT%{_mandir}/man8
116 cp -p defs.h $RPM_BUILD_ROOT%{_includedir}/crash
117 %endif
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %post   -n kernel%{_alt_kernel}-char-crash
123 %depmod %{_kernel_ver}
124
125 %postun -n kernel%{_alt_kernel}-char-crash
126 %depmod %{_kernel_ver}
127
128 %if %{with userspace}
129 %files
130 %defattr(644,root,root,755)
131 %doc README
132 %attr(755,root,root) %{_bindir}/crash
133 %dir %{_libdir}/crash
134 %dir %{_libdir}/crash/extensions
135 %attr(755,root,root) %{_libdir}/crash/extensions/dminfo.so
136 %attr(755,root,root) %{_libdir}/crash/extensions/echo.so
137 %attr(755,root,root) %{_libdir}/crash/extensions/eppic.so
138 %attr(755,root,root) %{_libdir}/crash/extensions/snap.so
139 %attr(755,root,root) %{_libdir}/crash/extensions/trace.so
140 %{_mandir}/man8/crash.8*
141
142 %files devel
143 %defattr(644,root,root,755)
144 %{_includedir}/crash
145 %endif
146
147 %if %{with kernel}
148 %files -n kernel%{_alt_kernel}-char-crash
149 %defattr(644,root,root,755)
150 %doc memory_driver/README
151 /lib/modules/%{_kernel_ver}/kernel/drivers/char/crash.ko*
152 %endif
This page took 0.044158 seconds and 4 git commands to generate.