File iwl5000-ucode.spec of Package iwl5000-ucode

#
# spec file for package iwl5000-ucode (Version 5.4.A.11)
#
# 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:           iwl5000-ucode
Url:            http://intellinuxwireless.org/
Summary:        Firmware for Intel PRO/Wireless 5100 ABGN and 5300 ABGN WLAN Cards
Version:        5.4.A.11
Release:        2
Group:          Hardware/Wifi
License:        Any commercial
Source0:        iwlwifi-5000-ucode-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
PreReq:         module-init-tools grep
Supplements:    modalias(pci:v00008086d0000423Asv*sd*bc*sc*i*)
Supplements:    modalias(pci:v00008086d00004237sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v00008086d00004236sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v00008086d00004235sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v00008086d00004232sv*sd*bc*sc*i*)
Supplements:    modalias(pci:v00008086d00004237sv*sd00001216bc*sc*i*)
Supplements:    modalias(pci:v00008086d00004232sv*sd00001326bc*sc*i*)
Supplements:    modalias(pci:v00008086d00004232sv*sd00001306bc*sc*i*)
Supplements:    modalias(pci:v00008086d00004232sv*sd00001206bc*sc*i*)
Supplements:    modalias(pci:v00008086d00004232sv*sd00001305bc*sc*i*)
Supplements:    modalias(pci:v00008086d00004232sv*sd00001205bc*sc*i*)

%description
This package is required for running Intel PRO/Wireless 5100 ABGN and
5300 ABGN wireless LAN adapters.



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

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

%build

%install
mkdir -p %{buildroot}/lib/firmware
cp iwlwifi-5000-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 iwlagn ; then
	if driver_loaded iwlagn; then
		echo "Reloading module iwlagn"
		rmmod iwlagn
		modprobe iwlagn
	fi
fi
exit 0

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

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

%changelog
* Fri Sep 05 2008 hschaa@suse.de
- Initial package
openSUSE Build Service is sponsored by