]> git.pld-linux.org Git - packages/kexec-tools.git/blob - kexec-tools.spec
e4240ad7a48be40ee1956524e0df1c8f6ac85546
[packages/kexec-tools.git] / kexec-tools.spec
1 #
2 # Conditional build:
3 %bcond_without  xen             # Xen support
4 %bcond_with     booke           # [PPC] build for BookE
5 %bcond_with     gamecube        # [PPC] build for GameCube
6
7 %ifarch x32
8 # Xen not (yet?) available
9 %undefine       with_xen
10 %endif
11 Summary:        Tool for starting new kernel without reboot
12 Summary(pl.UTF-8):      Narzędzie pozwalające załadować nowe jądro bez konieczności restartu
13 Name:           kexec-tools
14 Version:        2.0.22
15 Release:        1
16 License:        GPL v2
17 Group:          Applications/System
18 Source0:        https://www.kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.xz
19 # Source0-md5:  f11248953c777427757b5ba5ddb1ce9b
20 Source1:        kexec.init
21 Source2:        kexec.sysconfig
22 # from http://patchwork.openembedded.org/patch/90971/raw/ (stripped to remaining syscall part)
23 Patch0:         %{name}-x32.patch
24 URL:            https://www.kernel.org/pub/linux/utils/kernel/kexec/
25 BuildRequires:  autoconf >= 2.50
26 BuildRequires:  rpmbuild(macros) >= 1.228
27 BuildRequires:  tar >= 1:1.22
28 %{?with_xen:BuildRequires:      xen-devel >= 4.4}
29 BuildRequires:  xz
30 BuildRequires:  xz-devel
31 BuildRequires:  zlib-devel
32 Requires(post,preun):   /sbin/chkconfig
33 Requires:       rc-scripts >= 0.4.0.9
34 ExclusiveArch:  %{ix86} %{x8664} x32 alpha %{arm} aarch64 cris ia64 m68k mips ppc ppc64 s390 s390x sh
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %define         _sbindir        /sbin
38
39 %description
40 kexec is a set of system calls that allows you to load another kernel
41 from the currently executing Linux kernel. The current implementation
42 has only been tested, and had the kinks worked out on x86, but the
43 generic code should work on any architecture.
44
45 %description -l pl.UTF-8
46 kexec to zestaw wywołań systemowych pozwalających załadować następne
47 jądro z poziomu aktualnie działającego jądra Linuksa. Aktualna
48 implementacja była testowana tylko na x86, ale ogólny kod powinien
49 działać na każdej architekturze.
50
51 %prep
52 %setup -q
53 %patch0 -p1
54
55 %build
56 %{__autoconf}
57 %configure \
58         %{?with_booke:--with-booke} \
59         %{?with_gamecube:--with-gamecube} \
60         %{!?with_xen:--without-xen}
61 %{__make}
62
63 %install
64 rm -rf $RPM_BUILD_ROOT
65 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
66
67 %{__make} install \
68         DESTDIR=$RPM_BUILD_ROOT
69
70 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/kexec
71 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/kexec
72
73 %clean
74 rm -rf $RPM_BUILD_ROOT
75
76 %post
77 /sbin/chkconfig --add kexec
78 %service kexec restart
79
80 %preun
81 if [ "$1" = "0" ]; then
82         %service -q kexec stop
83         /sbin/chkconfig --del kexec
84 fi
85
86 %files
87 %defattr(644,root,root,755)
88 %doc AUTHORS News TODO
89 %attr(754,root,root) /etc/rc.d/init.d/kexec
90 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/kexec
91 %attr(755,root,root) %{_sbindir}/kexec
92 %attr(755,root,root) %{_sbindir}/vmcore-dmesg
93 %{_mandir}/man8/kexec.8*
94 %{_mandir}/man8/vmcore-dmesg.8*
95 %ifarch %{ix86} x32
96 %dir %{_libdir}/kexec-tools
97 # what is this anyway, is it needed on other arches?
98 %attr(755,root,root) %{_libdir}/kexec-tools/kexec_test
99 %endif
This page took 0.023835 seconds and 2 git commands to generate.