]> git.pld-linux.org Git - packages/crash.git/blame - crash.spec
- enhanced format patch to cover more archs
[packages/crash.git] / crash.spec
CommitLineData
61472ea8 1# TODO:
7d6e8030 2# - libeppic if anything else (but crash extension) wants to use it
61472ea8 3#
2025c975
JB
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#
61472ea8
JB
10Summary: Core Analysis Suite
11Summary(pl.UTF-8): Zestaw narzędzi do analizy zrzutów pamięci
12Name: crash
13Version: 7.0.1
14Release: 1
15License: GPL v2+
16Group: Libraries
17Source0: http://people.redhat.com/anderson/%{name}-%{version}.tar.gz
18# Source0-md5: b59076aebaced87e9073328cb0a4f50a
7d6e8030
JB
19# git clone https://code.google.com/p/eppic
20Source1: eppic.tar.xz
21# Source1-md5: a9f80ad71de9d6f5b77534a7ebdbed8e
b41a0904 22Patch0: %{name}-format.patch
61472ea8 23URL: http://people.redhat.com/anderson/
2025c975
JB
24%if %{with kernel} && %{with dist_kernel}
25BuildRequires: kernel-module-build >= 2.6
26%endif
27%if %{with userspace}
61472ea8
JB
28BuildRequires: ncurses-devel
29BuildRequires: readline-devel
30BuildRequires: xz-devel
31BuildRequires: zlib-devel
2025c975 32%endif
61472ea8
JB
33ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc64 s390 s390x
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
37The core analysis suite is a self-contained tool that can be used to
38investigate either live systems, kernel core dumps created from the
39netdump and diskdump packages offered by Red Hat, the LKCD kernel
40patch or the mcore kernel patch available from Mission Critical Linux.
41
42%description -l pl.UTF-8
43Narzędzie do analizy zrzutów pamięci to samodzielny program służący do
44badania systemów działających, zrzutów pamięci jądra utworzonych przez
45pakiety Red Hata netdump lub diskdump, łatę jądra LKCD lub łatę jądra
46mcore dostępną w Mission Critical Linuksie.
47
48%package devel
49Summary: Header files for core analysis suite
50Summary(pl.UTF-8): Plik nagłówkowy narzędzia do analizy zrzutów pamięci
51Group: Development/Libraries
52# doesn't require base
53
54%description devel
55Header files for core analysis suite.
56
57%description devel -l pl.UTF-8
58Plik nagłówkowy narzędzia do analizy zrzutów pamięci.
59
2025c975
JB
60%package -n kernel%{_alt_kernel}-char-crash
61Summary: Memory driver for live system crash sessions
62Summary(pl.UTF-8): Sterownik pamięci dla sesji crash na żywym systemie
63Release: %{release}@%{_kernel_ver_str}
64Group: Base/Kernel
65Requires(post,postun): /sbin/depmod
66%if %{with dist_kernel}
67%requires_releq_kernel
68Requires(postun): %releq_kernel
69%endif
70
71%description -n kernel%{_alt_kernel}-char-crash
72This package contains /dev/crash memory driver for live system crash
73sessions, which may be used when /dev/mem and /proc/kcore are
74unavailable.
75
76%description -n kernel%{_alt_kernel}-char-crash -l pl.UTF-8
77Ten 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
61472ea8 81%prep
7d6e8030 82%setup -q -a1
b41a0904 83%patch0 -p1
61472ea8 84
7d6e8030 85%{__mv} eppic extensions
61472ea8
JB
86
87%build
2025c975
JB
88%if %{with kernel}
89%build_kernel_modules -C memory_driver -m crash
90%endif
91
92%if %{with userspace}
61472ea8
JB
93export 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"
2025c975 98%endif
61472ea8
JB
99
100%install
101rm -rf $RPM_BUILD_ROOT
2025c975
JB
102
103%if %{with kernel}
104%install_kernel_modules -m memory_driver/crash -d kernel/drivers/char
105%endif
106
107%if %{with userspace}
6d83b7e9 108install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man8,%{_libdir}/crash/extensions,%{_includedir}/crash}
61472ea8
JB
109
110%{__make} install \
111 DESTDIR=$RPM_BUILD_ROOT
112
113# omitted by make install
6d83b7e9 114install extensions/*.so $RPM_BUILD_ROOT%{_libdir}/crash/extensions
61472ea8
JB
115cp -p crash.8 $RPM_BUILD_ROOT%{_mandir}/man8
116cp -p defs.h $RPM_BUILD_ROOT%{_includedir}/crash
2025c975 117%endif
61472ea8
JB
118
119%clean
120rm -rf $RPM_BUILD_ROOT
121
2025c975
JB
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}
61472ea8
JB
129%files
130%defattr(644,root,root,755)
131%doc README
132%attr(755,root,root) %{_bindir}/crash
6d83b7e9
JB
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
7d6e8030 137%attr(755,root,root) %{_libdir}/crash/extensions/eppic.so
6d83b7e9
JB
138%attr(755,root,root) %{_libdir}/crash/extensions/snap.so
139%attr(755,root,root) %{_libdir}/crash/extensions/trace.so
61472ea8
JB
140%{_mandir}/man8/crash.8*
141
142%files devel
143%defattr(644,root,root,755)
144%{_includedir}/crash
2025c975
JB
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.087759 seconds and 4 git commands to generate.