forked from pool/hyper-v
This commit is contained in:
26
hyper-v.spec
26
hyper-v.spec
@@ -30,17 +30,20 @@ BuildRequires: kernel-pae-devel
|
||||
%endif
|
||||
%endif
|
||||
ExclusiveArch: %ix86 x86_64
|
||||
PreReq: %insserv_prereq
|
||||
Group: System/Kernel
|
||||
AutoReqProv: on
|
||||
Summary: Microsoft Hyper-V drivers
|
||||
Url: http://www.kernel.org
|
||||
Version: 0
|
||||
Release: 0.<RELEASE14>
|
||||
Release: %(bash %_sourcedir/get_release_number.sh)
|
||||
Source: Module.supported
|
||||
Source1: hyperv_pvdrivers.conf
|
||||
Source2: kmp_filelist
|
||||
Source3: hyper-v.supplements.txt
|
||||
Source4: hyper-v.dummy_ko.c
|
||||
Source10: hv_kvp_daemon.c
|
||||
Source11: hyper-v.init.sh
|
||||
License: GPL v2 only
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %{with_kmp}
|
||||
@@ -74,6 +77,7 @@ This package contains the Microsoft Hyper-V drivers.
|
||||
%setup -Tc
|
||||
|
||||
%build
|
||||
gcc $RPM_OPT_FLAGS -g %{S:10} -o hv_kvp_daemon
|
||||
%if %{with_kmp}
|
||||
for flavor in %flavors_to_build; do
|
||||
%if %{with_drivers_in_kmp}
|
||||
@@ -99,15 +103,31 @@ for flavor in %flavors_to_build; do
|
||||
make -C %{kernel_source $flavor} modules_install M=$PWD/$flavor
|
||||
done
|
||||
%endif
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/sbin
|
||||
install -m755 hv_kvp_daemon $RPM_BUILD_ROOT/usr/sbin
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||
install -m755 %{S:11} $RPM_BUILD_ROOT/etc/init.d/hv_kvp_daemon
|
||||
ln -sfvbn ../..//etc/init.d/hv_kvp_daemon $RPM_BUILD_ROOT/usr/sbin/rchv_kvp_daemon
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d
|
||||
install -m644 %SOURCE1 $RPM_BUILD_ROOT/etc/modprobe.d/hyperv_pvdrivers.conf
|
||||
|
||||
%if !%{with_kmp}
|
||||
|
||||
%files
|
||||
%defattr (-,root,root)
|
||||
%if !%{with_kmp}
|
||||
%dir /etc/modprobe.d
|
||||
%config /etc/modprobe.d/hyperv_pvdrivers.conf
|
||||
%endif
|
||||
/etc/init.d/hv_kvp_daemon
|
||||
/usr/sbin/rchv_kvp_daemon
|
||||
/usr/sbin/hv_kvp_daemon
|
||||
|
||||
%post
|
||||
%{fillup_and_insserv hv_kvp_daemon}
|
||||
|
||||
%preun
|
||||
%stop_on_removal
|
||||
|
||||
%postun
|
||||
%insserv_cleanup
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user