File hci_usb.spec of Package hci_usb

#
# spec file for package hci_usb (Version 0.1)
#
# 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
# nodebuginfo


Name:           hci_usb
BuildRequires:  kernel-syms module-init-tools
Group:          System/Kernel
AutoReqProv:    on
Summary:        The old driver for USB Bluetooth dongles
Version:        0.1
Release:        2.<RELEASE47>
Source:         README
Source1:        modprobe.hci_usb
Source2:        README.hci_usb
Url:            http://kernel.org
License:        BSD 3-Clause; GPL v2 only
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
ExclusiveArch:  %ix86 x86_64 ppc ppc64
PreReq:         coreutils grep
%ifarch %ix86
# the debug kernel module does not get past rpmlint checks
%suse_kernel_module_package -n %name kdump um debug
%else
%suse_kernel_module_package -n %name kdump um
%endif
%define kernel_version  %(echo `rpm -q --queryformat '%{VERSION}-%{RELEASE}' kernel-source`|sed 's/_/-/g;')

%description
hci_usb is the old and deprecated driver module for USB Bluetooth
dongles. If you have problems with the newer "btusb" driver, you can
install this package and load hci_usb. You should, however, file a bug
against btusb. Please note that the hci_usb driver is known to be
broken and to e.g. corrupt memory in some circumstances. So do not
report any kernel bugs with this driver in use.



Authors:
--------
    Marcel Holtmann and the Linux Kernel developers gang

%package KMP
Group:          System/Kernel
License:        GPL v2 only
Summary:        The old driver for USB Bluetooth dongles
Requires:       %name

%description KMP
hci_usb is the old and deprecated driver module for USB Bluetooth
dongles. If you have problems with the newer "btusb" driver, you can
install this package and load hci_usb. You should, however, file a bug
against btusb. Please note that the hci_usb driver is known to be
broken and to e.g. corrupt memory in some circumstances. So do not
report any kernel bugs with this driver in use.



Authors:
--------
    Marcel Holtmann and the Linux Kernel developers gang

%prep

%build
echo "flavors_to_build: %{flavors_to_build}"
cp -a /usr/src/linux/drivers/bluetooth source
mkdir obj

%install
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=updates
for flavor in %flavors_to_build; do
     cp -a source obj/$flavor
     pushd obj/$flavor
     make -C /usr/src/linux-obj/%_target_cpu/$flavor M=$PWD modules CONFIG_BT_HCIUSB=m CONFIG_BT_HCIUSB_SCO=y
     make -C /usr/src/linux-obj/%_target_cpu/$flavor M=$PWD modules_install CONFIG_BT_HCIUSB=m CONFIG_BT_HCIUSB_SCO=y
     popd
done
install -D -m 644 %{S:1} %buildroot/%_sysconfdir/modprobe.d/hci_usb
install -D -m 644 %{S:2} %buildroot/%_defaultdocdir/%name/README.hci_usb
for i in `find $RPM_BUILD_ROOT/lib/modules -name "*.ko"` ; do
    case $i in
	*/hci?usb.ko) ;;
	*) rm -v $i ;;
    esac
done

%files -n %name
%defattr(-, root, root)
%doc %_defaultdocdir/%name
%config(noreplace) %_sysconfdir/modprobe.d/hci_usb

%changelog
* Wed Sep 17 2008 seife@suse.de
- update documentation, default to _not_ loading hci_usb, even if
  this package is installed (it gets pulled in by the solver if
  bluetooth hardware is present).
* Mon Sep 15 2008 seife@suse.de
- rename to hci_usb
* Sun Aug 10 2008 ro@suse.de
- different hack to build this one
* Fri Jul 18 2008 seife@suse.de
- add %%defattr for rpmlint checks
* Thu Jul 17 2008 seife@suse.de
- add a btusb-kmp package with documentation and configuration
* Tue May 27 2008 seife@suse.de
- fix missing struct_module problem (resulting in a tainted kernel)
* Mon May 05 2008 seife@suse.de
- add an explicit license (BSD) for the specfile
* Fri Apr 25 2008 seife@suse.de
- initial submission
openSUSE Build Service is sponsored by