File brocade-bfa.spec of Package brocade-bfa

#
# spec file for package brocade-bfa (Version 1.1.0.2)
#
# Copyright (c) 2009 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


Name:           brocade-bfa
BuildRequires:  kernel-source kernel-syms module-init-tools
ExcludeArch:    ppc ppc64 s390 s390x
License:        GPL v2 only
Group:          System/Kernel
Summary:        Brocade bfa Kernel Module Package
Version:        1.1.0.2
Release:        8
Source0:        %name-%version.tar.gz
Source1:        LICENSE.bfa
Source2:        gpl-2.0.txt
Patch:          bfa_sles11_12172008.patch
Patch1:         brocade-bfa-2.6.28.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%suse_kernel_module_package kdump um

%description
This is a Kernel Module Package for the Brocade FC HBA driver.



Authors:
--------
    Jing Huang
    Philip Oswald

%package KMP
License:        GPL v2 only
Summary:        Brocade bfa Kernel Module Package
Group:          System/Kernel

%description KMP
This is a Kernel Module Package for the Brocade FC HBA driver.



%prep
%setup
%patch -p1
%patch1 -p1
set -- *
mkdir source
mv "$@" source/
echo "bfa.ko external" > source/Module.supported
cp %_sourcedir/LICENSE.bfa source/LICENSE.bfa
mkdir obj

%build
export EXTRA_CFLAGS='-DVERSION=\"%version\"'
for flavor in %flavors_to_build; do
    rm -rf obj/$flavor
    cp -r source obj/$flavor
    make -C /usr/src/linux-obj/%_target_cpu/$flavor modules \
	M=$PWD/obj/$flavor
done

%install
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 modules_install \
	 M=$PWD/obj/$flavor
    install -m755 -d $RPM_BUILD_ROOT/usr/share/doc/bfa
    install -m644 $PWD/obj/$flavor/LICENSE.bfa \
            $RPM_BUILD_ROOT/usr/share/doc/bfa/LICENSE.bfa
    install -m644 %SOURCE2 $RPM_BUILD_ROOT/usr/share/doc/bfa/
done

%files
%defattr(-,root,root)
%doc /usr/share/doc/bfa

%changelog
* Tue Jun 09 2009 coolo@suse.de
- remove rt KMP support til a working solution is found
* Mon Apr 20 2009 ro@suse.de
- fix build with current kernel
  device_create_drvdata -> device_create
* Mon Jan 12 2009 dgollub@suse.de
- Add kernel-syms-rt to build requires to build SLERT KMPs
* Thu Dec 18 2008 poswald@novell.com
-Rev'd package to 2.
-Patch added to correct ioctl/scsi_passthru code. The patch
  necessary to prevent a system crash.  Patch provided by
  Jing Huang of Brocade.
* Mon Nov 24 2008 kukuk@suse.de
- Fix install section
- Add GPLv2 license text
* Mon Nov 24 2008 poswald@novell.com
-Received a v1.1.0.2 package from Brocade including the following:
-replaced original md5.c and md5.h with the files from public domain.
* Fri Nov 21 2008 poswald@novell.com
-Rev'd the package to 1
-Added the missing LICENSE.bfa file essentially replacing the README
-Replaced the bfa_log_module.c with one that compliments the GPL license
-Changes came from Jing Huang of Brocade
* Fri Nov 21 2008 poswald@novell.com
-Initial build of the Brocade bfa fibre channel driver v1.1.0.1
  Developer from Brocade is Jing Huang huangj@brocade.com
  Brocade is helping to provide L3 support
openSUSE Build Service is sponsored by