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