File cluster-network.spec of Package cluster-network
#
# spec file for package cluster-network
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
%ifarch x86_64
%define buildrt 0
%endif
Url: http://www.kernel.org/
Name: cluster-network
BuildRequires: kernel-syms module-init-tools
%if 0%{?buildrt} == 1
BuildRequires: kernel-syms-rt
%endif
BuildRequires: kernel-source
Group: System/Kernel
AutoReqProv: on
Summary: IP Virtual Server kernel modules
Version: 1.4
Release: 2.<RELEASE23>
License: GPL v2 only
Source1: Module.supported
Source2: Makefile.ipt_CLUSTERIP
Source3: COPYING
Source4: preamble
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%kernel_module_package -p %_sourcedir/preamble
%description
This package contains kernel modules for IP Virtual Server and the
CLUSTERIP netfilter target module.
%prep
%setup -Tc
%build
for flavor in %flavors_to_build; do
mkdir -p $flavor/ipvs
source=/lib/modules/$(make -sC %{kernel_source $flavor} kernelrelease)/source
ipvs_path=$source/net/ipv4/ipvs
if ! test -d "$ipvs_path"; then
ipvs_path=$source/net/netfilter/ipvs
fi
if ! test -d "$ipvs_path"; then
echo "Cannot find ipvs source" >&2
exit 1
fi
cp -a %_sourcedir/Module.supported "$ipvs_path"/* \
$flavor/ipvs/
make -C %{kernel_source $flavor} modules M=$PWD/$flavor/ipvs
mkdir -p $flavor/netfilter
cp -a %_sourcedir/Module.supported $source/net/ipv4/netfilter/* \
$flavor/netfilter
cp %_sourcedir/Makefile.ipt_CLUSTERIP $flavor/netfilter/Makefile
make -C %{kernel_source $flavor} modules M=$PWD/$flavor/netfilter
done
%install
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
for flavor in %flavors_to_build; do
export INSTALL_MOD_DIR=updates/ipvs
make -C %{kernel_source $flavor} modules_install \
M=$PWD/$flavor/ipvs
export INSTALL_MOD_DIR=updates/netfilter
make -C %{kernel_source $flavor} modules_install \
M=$PWD/$flavor/netfilter
done
%changelog