File iwl6000-ucode.spec of Package iwl6000-ucode
#
# spec file for package iwl6000-ucode (Version 9.193.4.1)
#
# Copyright (c) 2010 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: iwl6000-ucode
Url: http://intellinuxwireless.org/
Summary: Intel 6000 Series Wi-Fi Adapters firmware
Version: 9.193.4.1
Release: 1
Group: Hardware/Wifi
License: Redistributable in non-modified form
Source0: iwlwifi-6000-ucode-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
PreReq: module-init-tools grep
%description
This package is required for running Intel PRO/Wireless 6000 wireless LAN adapters.
Authors:
--------
Intel Corporation
%prep
%setup0 -c
%build
%install
mkdir -p %{buildroot}/lib/firmware
cd iwlwifi-6000-ucode-%{version}
cp iwlwifi-6000-4.ucode %{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)
%doc iwlwifi-6000-ucode-%{version}/README.iwlwifi-6000-ucode iwlwifi-6000-ucode-%{version}/LICENSE.iwlwifi-6000-ucode
/lib/firmware/*
%clean
test "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT
%changelog