wok-next rev 587

Add: b43-fwcutter + get-b43-firmware
author Christophe Lincoln <pankso@slitaz.org>
date Wed Apr 16 01:37:50 2008 +0200 (2008-04-16)
parents 105b6d393c9d
children 1f64c55082ab
files b43-fwcutter/receipt get-b43-firmware/receipt get-b43-firmware/stuff/get-b43-firmware
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/b43-fwcutter/receipt	Wed Apr 16 01:37:50 2008 +0200
     1.3 @@ -0,0 +1,32 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="b43-fwcutter"
     1.7 +VERSION="011"
     1.8 +CATEGORY="system-tool"
     1.9 +SHORT_DESC="Broadcom b43 firmware extractor."
    1.10 +MAINTAINER="pankso@slitaz.org"
    1.11 +TARBALL="$PACKAGE-$VERSION.tar.bz2"
    1.12 +WEB_SITE="http://developer.berlios.de/project/showfiles.php?group_id=4547"
    1.13 +WGET_URL="http://bu3sch.de/b43/fwcutter/$TARBALL"
    1.14 +
    1.15 +# Rules to configure and make the package.
    1.16 +compile_rules()
    1.17 +{
    1.18 +    cd $src
    1.19 +    make
    1.20 +}
    1.21 +
    1.22 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.23 +genpkg_rules()
    1.24 +{
    1.25 +	mkdir -p $fs/usr/bin
    1.26 +	cp -a $src/b43-fwcutter $fs/usr/bin
    1.27 +}
    1.28 +
    1.29 +# Ensure /lib/firmware exist.
    1.30 +post_install()
    1.31 +{
    1.32 +	local root
    1.33 +	root=$1
    1.34 +	mkdir -p $root/lib/firmware
    1.35 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/get-b43-firmware/receipt	Wed Apr 16 01:37:50 2008 +0200
     2.3 @@ -0,0 +1,16 @@
     2.4 +# SliTaz package receipt.
     2.5 +
     2.6 +PACKAGE="get-b43-firmware"
     2.7 +VERSION="1.00"
     2.8 +CATEGORY="non-free"
     2.9 +SHORT_DESC="Get Broadcom b43 firmware."
    2.10 +MAINTAINER="pankso@slitaz.org"
    2.11 +WEB_SITE="http://downloads.openwrt.org/"
    2.12 +DEPENDS="b43-fwcutter"
    2.13 +
    2.14 +# Rules to gen a SliTaz package suitable for Tazpkg.
    2.15 +genpkg_rules()
    2.16 +{
    2.17 +	mkdir -p $fs/usr/bin
    2.18 +	cp stuff/$PACKAGE $fs/usr/bin
    2.19 +}
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/get-b43-firmware/stuff/get-b43-firmware	Wed Apr 16 01:37:50 2008 +0200
     3.3 @@ -0,0 +1,51 @@
     3.4 +#!/bin/sh
     3.5 +#
     3.6 +# Get and install non-free Broadcom b43 firmware.
     3.7 +#
     3.8 +
     3.9 +DIR="broadcom-wl"
    3.10 +VERSION=4.80.53.0
    3.11 +TARBALL=$DIR-$VERSION.tar.bz2
    3.12 +WGET_URL="http://downloads.openwrt.org/sources/$TARBALL"
    3.13 +
    3.14 +# Check if user is root to install.
    3.15 +if test $(id -u) != 0 ; then
    3.16 +	echo -e "\nYou must be root to run `basename $0`."
    3.17 +	echo -e "Please use 'su' and root password to become super-user.\n"
    3.18 +	exit 0
    3.19 +fi
    3.20 +
    3.21 +# Avoid reinstall
    3.22 +if [ ! -d /var/lib/tazpkg/installed/b43-firmware ]; then
    3.23 +	echo -e "\nb43-firmware package is already installed.\n"
    3.24 +	exit 0
    3.25 +fi
    3.26 +
    3.27 +# Get files
    3.28 +cd /tmp
    3.29 +wget $WGET_URL
    3.30 +tar xjf $TARBALL
    3.31 +cd $DIR-$VERSION/kmod
    3.32 +
    3.33 +# Create pseudo package
    3.34 +mkdir -p b43-firmware-$VERSION/fs/lib/firmware 
    3.35 +b43-fwcutter -w "b43-firmware-$VERSION/fs/lib/firmware" wl_apsta.o
    3.36 +
    3.37 +# Creat receipt
    3.38 +cat > b43-firmware-$VERSION/receipt <<EOT
    3.39 +PACKAGE="b43-firmware"
    3.40 +VERSION="$VERSION"
    3.41 +CATEGORY="non-free"
    3.42 +SHORT_DESC="Broadcom b43 firmware."
    3.43 +WEB_SITE="http://downloads.openwrt.org/"
    3.44 +EOT
    3.45 +
    3.46 +# Pack
    3.47 +tazpkg pack b43-firmware-$VERSION
    3.48 +
    3.49 +# Install pseudo package
    3.50 +tazpkg install b43-firmware-$VERSION.tazpkg
    3.51 +
    3.52 +# Clean
    3.53 +cd /tmp
    3.54 +rm -rf $TARBALL $DIR-$VERSION