Search
j0ke.net Open Build Service
>
Projects
>
OFED
>
ib-bonding
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 3
[-]
[+]
Changed
ib-bonding.spec
@@ -11,18 +11,30 @@ %define redhat5 %( if ( rpm -q redhat-release-5Server > /dev/null ) && ([ "$(rpm -q --qf '%{RELEASE}' redhat-release-5Server)" = 5.0.0.9 ]) ; then echo 1; else echo 0;fi) %define sles10sp1 %( if ( rpm -q sles-release > /dev/null ) && ([ "$(rpm -q --qf '%{RELEASE}' sles-release)" = 15.22 ]); then echo 1; else echo 0;fi) -Summary : ib_bonding patch and modules. -Name : %{name} -Version : %{version} -Release : %{_release} -Vendor : Voltaire Inc. -Source : ib-bonding-%{version}.tar.gz -Group : Applications/System -License : GPL +Summary: ib_bonding patch and modules. +Name: %{name} +Version: %{version} +Release: %{_release} +Vendor: Voltaire Inc. +Source0: ib-bonding-%{version}.tar.gz +Source1: preamble +Group: Applications/System +License: GPL BuildRoot: %{_tmppath}/%{name}-%{version}-root %if 0%{?suse_version} BuildRequires: kernel-source +%suse_kernel_module_package -p %_sourcedir/preamble kdump um iseries64 ppc64 debug + +%package KMP +Summary: ib_bonding Drivers +Group: System/Kernel + +%description KMP +This package contains the kernel modules of the ib_bonding +Interface. For details see the ib-bonding package. + + %endif %if 0%{?centos_version} || 0%{?fedora_version} BuildRequires: kernel-devel @@ -35,10 +47,13 @@ %prep rm -rf $RPM_BUILD_ROOT %setup +%if 0%{?centos_version} || 0%{?fedora_version} cd linux/ ./configure --kernel-version %{KVERSION} +%endif %build +%if 0%{?centos_version} || 0%{?fedora_version} cd linux/drivers/net/bonding/ if make -C /lib/modules/%{KVERSION}/build modules M=`pwd`; then echo " Building IB bonding driver finished with success" @@ -46,12 +61,28 @@ echo " Building IB bonding driver failed" exit 1 fi +%endif + +%if 0%{?suse_version} +cd linux/drivers/net/ +mkdir -p obj +for flavor in %flavors_to_build; do + rm -rf obj/$flavor + cp -r bonding obj/$flavor + make -C /usr/src/linux-obj/%_target_cpu/$flavor LIBDIR=%{_libdir} modules \ + M=$PWD/obj/$flavor KSRC=/usr/src/linux-obj/%_target_cpu/$flavor +done +%endif %install [ "${RPM_BUILD_ROOT}" != "/" -a -d ${RPM_BUILD_ROOT} ] && rm -rf ${RPM_BUILD_ROOT} + +%if 0%{?centos_version} || 0%{?fedora_version} mkdir -p ${RPM_BUILD_ROOT}/lib/modules/%{KVERSION}/updates/kernel/drivers/net/bonding/ +%endif + mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/bin mkdir -p ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-%{version} %if %{redhat4u456} @@ -61,7 +92,21 @@ %if %{sles10sp1} mkdir -p ${RPM_BUILD_ROOT}/etc/sysconfig/network %endif +%if 0%{?centos_version} || 0%{?fedora_version} install -m 755 linux/drivers/net/bonding/bonding.ko ${RPM_BUILD_ROOT}/lib/modules/%{KVERSION}/updates/kernel/drivers/net/bonding/ +%endif +%if 0%{?suse_version} +# install kernel modules +export INSTALL_MOD_PATH=$RPM_BUILD_ROOT +export INSTALL_MOD_DIR=updates +for flavor in %flavors_to_build; do + make -C /usr/src/linux-obj/%_target_cpu/$flavor INSTALL_PREFIX="%{buildroot}" LIBDIR="%{_libdir}" \ + modules_install M=$PWD/obj/$flavor KSRC=/usr/src/linux-obj/%_target_cpu/$flavor + make INSTALL_PREFIX="%{buildroot}" LIBDIR="%{_libdir}" \ + install KSRC=/usr/src/linux-obj/%_target_cpu/$flavor +done +%endif + install -m 755 bin/ib-bond ${RPM_BUILD_ROOT}%{_prefix}/bin install -m 755 docs/ib-bonding.txt ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-%{version} sed -e {s/VERSION=/VERSION=%{version}/g} ${RPM_BUILD_ROOT}%{_prefix}/bin/ib-bond > /tmp/ib-bond @@ -148,8 +193,10 @@ done %endif -%files +%files +%if 0%{?centos_version} || 0%{?fedora_version} /lib/modules/%{KVERSION}/updates/kernel/drivers/net/bonding/bonding.ko +%endif %{_prefix}/bin/ib-bond %{_defaultdocdir}/%{name}-%{version}/ib-bonding.txt %if %{redhat4u456} @@ -170,3 +217,9 @@ %{_defaultdocdir}/%{name}-%{version}/series %{_defaultdocdir}/%{name}-%{version}/redhat5-initscripts.patch %endif + +%if 0%{?suse_version} +%files KMP +%defattr(-,root,root,-) +/lib +%endif