SHA256
1
0
forked from pool/hyper-v
2011-04-21 15:35:05 +00:00
committed by Git OBS Bridge
parent 4d9f8dd3b6
commit 08459eed5d
5 changed files with 780 additions and 3 deletions

View File

@@ -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