File iwl3945-ucode.spec of Package iwl3945-ucode

#
# spec file for package iwl3945-ucode (Version 15.28.1.8)
#
# Copyright (c) 2008 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:           iwl3945-ucode
Url:            http://intellinuxwireless.org/
Summary:        Firmware for Intel PRO/Wireless 3945ABG WLAN Cards
Version:        15.28.1.8
Release:        1
Group:          Hardware/Wifi
License:        No license agreement found in package; Redistributable in non-modified form
Source0:        iwlwifi-3945-ucode-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
PreReq:         module-init-tools grep
Supplements:    modalias(pci:v00008086d0000422[27]sv*sd*bc*sc*i*)

%description
This package is required for running Intel PRO/Wireless 3945ABG
wireless LAN adapters.



Authors:
--------
    Intel Corporation

%prep
%setup0 -n iwlwifi-3945-ucode-%{version}

%build

%install
mkdir -p %{buildroot}/lib/firmware
cp iwlwifi-3945-1.ucode %{buildroot}/lib/firmware
cp LICENSE* README* %{buildroot}/lib/firmware/

%post
test -f /.buildenv && exit 0
driver_active()
{
	for i in /sys/class/net/*/device/driver ; do
		test -e $i || continue
		DRV=$(basename `readlink $i`)
		test "$DRV" = "$1" && return 0
	done
	return 1
}
driver_loaded()
{
	lsmod | grep -q "$1"
}
if ! driver_active iwl3945 ; then
	if driver_loaded iwl3945; then
		echo "Reloading module iwl3945"
		rmmod iwl3945
		modprobe iwl3945
	fi
fi
exit 0

%files
%defattr(-,root,root)
/lib/firmware/*

%clean
test "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT

%changelog
* Thu Nov 20 2008 fseidel@suse.de
- update to version 15.28.1.8
* Fri Sep 05 2008 hschaa@suse.de
- update to version 15.28.1.6 which fixes association on
  passive 11a channels
* Thu Aug 23 2007 jg@suse.de
- fixed Supplements tag
* Wed Aug 01 2007 jg@suse.de
- update to version 2.14.1.5
* Mon Jul 23 2007 jg@suse.de
- update to version 2.14.4
- fixed postinstall script (this time for real)
* Thu Jun 21 2007 jg@suse.de
- fixed postinstall script
* Tue Jun 19 2007 jg@suse.de
- initial package
openSUSE Build Service is sponsored by