]> git.pld-linux.org Git - packages/crash.git/blob - crash.spec
- updated to 7.1.3
[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  kernel          # don't build kernel modules
6 %bcond_without  userspace       # don't build userspace programs
7 %bcond_with     verbose         # verbose kernel module build (V=1)
8
9 # The goal here is to have main, userspace, package built once with
10 # simple release number, and only rebuild kernel packages with kernel
11 # version as part of release number, without the need to bump release
12 # with every kernel change.
13 %if 0%{?_pld_builder:1} && %{with kernel} && %{with userspace}
14 %{error:kernel and userspace cannot be built at the same time on PLD builders}
15 exit 1
16 %endif
17
18 %if %{without userspace}
19 # nothing to be placed to debuginfo package
20 %define         _enable_debug_packages  0
21 %endif
22
23 %define         rel             1
24 %define         pname           crash
25 Summary:        Core Analysis Suite
26 Summary(pl.UTF-8):      Zestaw narzędzi do analizy zrzutów pamięci
27 Name:           %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
28 Version:        7.1.3
29 Release:        %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
30 License:        GPL v2+
31 Group:          Libraries
32 Source0:        http://people.redhat.com/anderson/%{pname}-%{version}.tar.gz
33 # Source0-md5:  f87b3c8a516fe13a71bfce7873e2cd44
34 # git clone https://code.google.com/p/eppic
35 Source1:        eppic.tar.xz
36 # Source1-md5:  a9f80ad71de9d6f5b77534a7ebdbed8e
37 URL:            http://people.redhat.com/anderson/
38 BuildRequires:  rpmbuild(macros) >= 1.701
39 %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
40 %if %{with userspace}
41 BuildRequires:  ncurses-devel
42 BuildRequires:  readline-devel
43 BuildRequires:  xz-devel
44 BuildRequires:  zlib-devel
45 %endif
46 ExclusiveArch:  %{ix86} %{x8664} alpha arm ia64 ppc64 s390 s390x
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 %description
50 The core analysis suite is a self-contained tool that can be used to
51 investigate either live systems, kernel core dumps created from the
52 netdump and diskdump packages offered by Red Hat, the LKCD kernel
53 patch or the mcore kernel patch available from Mission Critical Linux.
54
55 %description -l pl.UTF-8
56 Narzędzie do analizy zrzutów pamięci to samodzielny program służący do
57 badania systemów działających, zrzutów pamięci jądra utworzonych przez
58 pakiety Red Hata netdump lub diskdump, łatę jądra LKCD lub łatę jądra
59 mcore dostępną w Mission Critical Linuksie.
60
61 %package devel
62 Summary:        Header files for core analysis suite
63 Summary(pl.UTF-8):      Plik nagłówkowy narzędzia do analizy zrzutów pamięci
64 Group:          Development/Libraries
65 # doesn't require base
66
67 %description devel
68 Header files for core analysis suite.
69
70 %description devel -l pl.UTF-8
71 Plik nagłówkowy narzędzia do analizy zrzutów pamięci.
72
73 %define kernel_pkg()\
74 %package -n kernel%{_alt_kernel}-char-crash\
75 Summary:        Memory driver for live system crash sessions\
76 Summary(pl.UTF-8):      Sterownik pamięci dla sesji crash na żywym systemie\
77 Release:        %{rel}@%{_kernel_ver_str}\
78 Group:          Base/Kernel\
79 Requires(post,postun):  /sbin/depmod\
80 %requires_releq_kernel\
81 Requires(postun):       %releq_kernel\
82 \
83 %description -n kernel%{_alt_kernel}-char-crash\
84 This package contains /dev/crash memory driver for live system crash\
85 sessions, which may be used when /dev/mem and /proc/kcore are\
86 unavailable.\
87 \
88 %description -n kernel%{_alt_kernel}-char-crash -l pl.UTF-8\
89 Ten pakiet zawiera sterownik pamięci /dev/crash do sesji crash na\
90 żywym systemie. Może być używany do analizy, kiedy /dev/mem i\
91 /proc/kcore nie są dostępne.\
92 \
93 %if %{with kernel}\
94 %files -n kernel%{_alt_kernel}-char-crash\
95 %defattr(644,root,root,755)\
96 %doc memory_driver/README\
97 /lib/modules/%{_kernel_ver}/kernel/drivers/char/crash.ko*\
98 %endif\
99 \
100 %post   -n kernel%{_alt_kernel}-char-crash\
101 %depmod %{_kernel_ver}\
102 \
103 %postun -n kernel%{_alt_kernel}-char-crash\
104 %depmod %{_kernel_ver}\
105 %{nil}
106
107 %define build_kernel_pkg()\
108 %build_kernel_modules -C memory_driver -m crash\
109 %install_kernel_modules -D installed -m memory_driver/crash -d kernel/drivers/char\
110 %{nil}
111
112 %{?with_kernel:%{expand:%create_kernel_packages}}
113
114 %prep
115 %setup -q -a1 -n %{pname}-%{version}
116
117 %{__mv} eppic extensions
118
119 %build
120 %{?with_kernel:%{expand:%build_kernel_packages}}
121
122 %if %{with userspace}
123 export CPPFLAGS="%{rpmcppflags} -I/usr/include/ncurses"
124 %{__make} -j1 all extensions \
125         ARCH="%{_target_cpu}" \
126         CC="%{__cc}" \
127         CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
128 %endif
129
130 %install
131 rm -rf $RPM_BUILD_ROOT
132
133 %if %{with kernel}
134 install -d $RPM_BUILD_ROOT
135 cp -a installed/* $RPM_BUILD_ROOT
136 %endif
137
138 %if %{with userspace}
139 install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man8,%{_libdir}/crash/extensions,%{_includedir}/crash}
140
141 %{__make} install \
142         DESTDIR=$RPM_BUILD_ROOT
143
144 # omitted by make install
145 install extensions/*.so $RPM_BUILD_ROOT%{_libdir}/crash/extensions
146 cp -p crash.8 $RPM_BUILD_ROOT%{_mandir}/man8
147 cp -p defs.h $RPM_BUILD_ROOT%{_includedir}/crash
148 %endif
149
150 %clean
151 rm -rf $RPM_BUILD_ROOT
152
153 %if %{with userspace}
154 %files
155 %defattr(644,root,root,755)
156 %doc README
157 %attr(755,root,root) %{_bindir}/crash
158 %dir %{_libdir}/crash
159 %dir %{_libdir}/crash/extensions
160 %attr(755,root,root) %{_libdir}/crash/extensions/dminfo.so
161 %attr(755,root,root) %{_libdir}/crash/extensions/echo.so
162 %attr(755,root,root) %{_libdir}/crash/extensions/eppic.so
163 %attr(755,root,root) %{_libdir}/crash/extensions/snap.so
164 %attr(755,root,root) %{_libdir}/crash/extensions/trace.so
165 %{_mandir}/man8/crash.8*
166
167 %files devel
168 %defattr(644,root,root,755)
169 %{_includedir}/crash
170 %endif
This page took 0.047488 seconds and 4 git commands to generate.