From 9b74f99db451ca4e1b9299f4f33b87402bb72b1143c364b039eeefe8bbcd9a98 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 10 Apr 2008 20:14:11 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/b43-fwcutter?expand=0&rev=3 --- b43-fwcutter-009.tar.bz2 | 3 -- b43-fwcutter-011.tar.bz2 | 3 ++ b43-fwcutter.changes | 9 ++++++ b43-fwcutter.spec | 17 +++++++++-- install_bcm43xx_firmware | 61 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 87 insertions(+), 6 deletions(-) delete mode 100644 b43-fwcutter-009.tar.bz2 create mode 100644 b43-fwcutter-011.tar.bz2 create mode 100644 install_bcm43xx_firmware diff --git a/b43-fwcutter-009.tar.bz2 b/b43-fwcutter-009.tar.bz2 deleted file mode 100644 index 6d6f206..0000000 --- a/b43-fwcutter-009.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:94f95cee6a1645d4b18c69910056b887a0355e6a8f11bc160e954c3153228837 -size 11924 diff --git a/b43-fwcutter-011.tar.bz2 b/b43-fwcutter-011.tar.bz2 new file mode 100644 index 0000000..f848131 --- /dev/null +++ b/b43-fwcutter-011.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cd6937b476f62bee5a7b932120e9a64aefd18cf6842f837375b7419db2f4358 +size 12538 diff --git a/b43-fwcutter.changes b/b43-fwcutter.changes index b3a39c1..3ac7dc2 100644 --- a/b43-fwcutter.changes +++ b/b43-fwcutter.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Apr 10 14:34:00 CEST 2008 - cstender@suse.de + +- updated to version 011 +- added supplement tag so package gets installed when a bcm43xx + card is detected +- added install_bcm43xx_firmware script which downloads and + extracts firmware files + ------------------------------------------------------------------- Sun Mar 16 07:31:01 CET 2008 - coolo@suse.de diff --git a/b43-fwcutter.spec b/b43-fwcutter.spec index d7fd08a..cc0c989 100644 --- a/b43-fwcutter.spec +++ b/b43-fwcutter.spec @@ -1,5 +1,5 @@ # -# spec file for package b43-fwcutter (Version 009) +# spec file for package b43-fwcutter (Version 011) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -15,15 +15,17 @@ Name: b43-fwcutter Group: Hardware/Wifi AutoReqProv: on Summary: Tool for extracting firmware from newer Broadcom WLAN drivers -Version: 009 -Release: 13 +Version: 011 +Release: 1 Source: %{name}-%{version}.tar.bz2 Patch0: %{name}.diff +Source1: install_bcm43xx_firmware Url: http://developer.berlios.de/projects/bcm43xx/ License: BSD 3-Clause; BSD 4-Clause BuildRoot: %{_tmppath}/%{name}-%{version}-build Obsoletes: bcm43xx-fwcutter Provides: bcm43xx-fwcutter +Supplements: modalias(pci:v000014E4d000043*sv*sd*bc*sc*i*) %define prefix /usr %description @@ -50,6 +52,8 @@ make CFLAGS="$RPM_OPT_FLAGS" %install make PREFIX=%{buildroot}/usr \ MANDIR=%{buildroot}/%{_mandir} install +mkdir -p %{buildroot}/usr/sbin +install -m 755 %SOURCE1 %{buildroot}/usr/sbin/ %clean %__rm -rf %{buildroot} @@ -57,10 +61,17 @@ make PREFIX=%{buildroot}/usr \ %files %defattr(-, root, root) %{_bindir}/b43-fwcutter +/usr/sbin/install_bcm43xx_firmware %{_mandir}/man1/b43-fwcutter.1* %doc README %changelog +* Thu Apr 10 2008 cstender@suse.de +- updated to version 011 +- added supplement tag so package gets installed when a bcm43xx + card is detected +- added install_bcm43xx_firmware script which downloads and + extracts firmware files * Sun Mar 16 2008 coolo@suse.de - correctly replace the old name * Thu Jan 10 2008 cstender@suse.de diff --git a/install_bcm43xx_firmware b/install_bcm43xx_firmware new file mode 100644 index 0000000..7973742 --- /dev/null +++ b/install_bcm43xx_firmware @@ -0,0 +1,61 @@ +#!/bin/sh +# +# install_bcm43xx_firmware +# +# This script tries to download and install the firmware needed to run +# WLAN cards using Broadcom's bcm43xx chips. + +# firmware for b43 +URL1=http://mirror2.openwrt.org/sources +FILE1=broadcom-wl-4.150.10.5.tar.bz2 +FIRMWARE1=broadcom-wl-4.150.10.5/driver/wl_apsta_mimo.o + +# firmware for b43legacy +URL2=http://downloads.openwrt.org/sources +FILE2=wl_apsta-3.130.20.0.o + +test -z "$( type -p curl)" && { echo "'curl' is not installed, aborting"; exit 1; } +test -z "$( type -p b43-fwcutter)" && { echo "'b43-fwcutter' is not installed, aborting"; exit 1; } +test -d /lib/firmware || mkdir -p /lib/firmware + +TMPDIR=$(mktemp -d /var/tmp/bcm.XXXXXX) || exit 1 + +pushd `pwd` >/dev/null +cd $TMPDIR + +echo "Downloading b43 firmware" +curl -# -f -o $FILE1 $URL1/$FILE1 +if [ $? -eq 0 ];then + echo "Extracting b43 firmware" + tar xjf $FILE1 + b43-fwcutter -w /lib/firmware $FIRMWARE1 +else + echo "Could not download b43 firmware." +fi + +echo +echo "Downloading b43legacy firmware" +curl -# -f -o $FILE2 $URL2/$FILE2 +if [ $? -eq 0 ];then + echo "Extracting b43legacy firmware" + b43-fwcutter -w /lib/firmware $FILE2 +else + echo "Could not download b43legacy firmware." +fi + +echo +if [ -d /lib/firmware/b43 ] ; then + echo "b43 firmware successfully installed." +else + echo "b43 firmware installation failed." +fi +if [ -d /lib/firmware/b43legacy ] ; then + echo "b43legacy firmware successfully installed." +else + echo "b43legacy firmware installation failed." +fi + +popd >/dev/null +rm -rf $TMPDIR + +exit 0