wok annotate get-dsl-firmware/stuff/get-dsl-firmware @ rev 3341

Remove DirectFB
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jun 11 11:12:42 2009 +0200 (2009-06-11)
parents 3c4e4aa73511
children 32959e7975fc
rev   line source
pascal@2167 1 #!/bin/sh
pascal@2167 2
pascal@2167 3 MODULE=$(echo $0 | sed 's/.*get-\(.*\)-firmware/\1/')
pascal@2167 4 ROOT="$1"
pascal@2167 5 PKG=$MODULE-firmware
pascal@2167 6 DEPENDS=""
pascal@2167 7 TMP=/tmp/$(basename $0)$$
pascal@2167 8
pascal@2167 9 case "$MODULE" in
pascal@2268 10 speedtouch|speedtouch-silver|speedtch)
pascal@2167 11 VERSION="3.012"
pascal@2167 12 SHORT_DESC="Firmware for SpeedTouch ADSL Modem."
pascal@2167 13 WEB_SITE="http://www.linux-usb.org/SpeedTouch/"
pascal@2167 14 URL="http://www.speedtouch.com/download/drivers/USB"
pascal@2167 15 URL="$URL/SpeedTouch330_firmware_$(echo $VERSION | sed 's/\.//').zip"
pascal@2167 16 ;;
pascal@2268 17 ueagle|ueagle-atm)
pascal@2167 18 VERSION="1.1"
pascal@2167 19 SHORT_DESC="Firmware for Fast800 USB ADSL Modem."
pascal@2167 20 SOURCE="ueagle-data"
pascal@2167 21 WEB_SITE="http://eagle-usb.org/"
pascal@2167 22 URL="${WEB_SITE}ueagle-atm/non-free/ueagle-data-$VERSION.tar.gz"
pascal@2167 23 ;;
pascal@2167 24 *) echo "Unknown dsl driver. Please run one of the following commands:"
pascal@2167 25 for i in $(cd $(dirname $0); ls get-*-firmware); do
pascal@2171 26 [ -L $i ] || continue
pascal@2171 27 [ "$(readlink $i)" = "get-dsl-firmware" ] || continue
pascal@2167 28 echo " $i"
pascal@2167 29 done
pascal@2167 30 exit 1;;
pascal@2167 31 esac
pascal@2167 32
pascal@2167 33 # Check if user is root to install.
pascal@2167 34 if test $(id -u) != 0 ; then
pascal@2167 35 echo -e "\nYou must be root to run `basename $0`."
pascal@2167 36 echo -e "Please use 'su' and root password to become super-user.\n"
pascal@2167 37 exit 0
pascal@2167 38 fi
pascal@2167 39
pascal@2167 40 # Avoid reinstall
pascal@2167 41 if [ -d $ROOT/var/lib/tazpkg/installed/$PKG ]; then
pascal@2167 42 echo -e "\n$PKG package is already installed.\n"
pascal@2167 43 exit 0
pascal@2167 44 fi
pascal@2167 45
pascal@2167 46 mkdir $TMP
pascal@2167 47 TOP=$PWD
pascal@2167 48 cd $TMP
pascal@2167 49
pascal@2167 50 mkdir -p $PKG-$VERSION/fs/lib/firmware
pascal@2167 51
pascal@2167 52 case "$MODULE" in
pascal@2268 53 speedtouch|speedtouch-silver|speedtch)
pascal@2167 54 wget $URL
pascal@2167 55 unzip -n $(basename $URL)
pascal@2167 56 wget http://www.linux-usb.org/SpeedTouch/firmware/firmware-extractor.tar.gz
pascal@2167 57 tar xzf firmware-extractor.tar.gz
pascal@2167 58 cd firmware-extractor/
pascal@2167 59 gcc -o firmware-extractor firmware.c
pascal@2167 60 FIRMWARE="ZZZL_$VERSION"
pascal@2167 61 [ "$MODULE" = "speedtouch" ] && FIRMWARE="KQD6_$VERSION"
pascal@2167 62 cp ../$FIRMWARE mgmt.o
pascal@2167 63 ./firmware-extractor mgmt.o
pascal@2167 64 install -m 600 speedtch-1.bin speedtch-2.bin \
pascal@2167 65 ../$PKG-$VERSION/fs/lib/firmware
pascal@2167 66 cd ..
pascal@2167 67 ;;
pascal@2268 68 ueagle|ueagle-atm)
pascal@2167 69 wget $URL
pascal@2167 70 tar xzf $(basename $URL)
pascal@2167 71 wget $(dirname $URL)/ueagle4-data-1.0.tar.gz
pascal@2167 72 tar xzf ueagle4-data-1.0.tar.gz
pascal@2168 73 mkdir -p $PKG-$VERSION/fs/lib/firmware/ueagle-atm
pascal@2167 74 cp -a ueagle-*/*.fw ueagle-*/*.bin ueagle4*/*.fw ueagle4*/*.bin* \
pascal@2168 75 $PKG-$VERSION/fs/lib/firmware/ueagle-atm
pascal@2168 76 chown root.root $PKG-$VERSION/fs/lib/firmware/ueagle-atm/*
pascal@2168 77 ln $PKG-$VERSION/fs/lib/firmware/ueagle-atm/CMV4p.bin.v2 \
pascal@2168 78 $PKG-$VERSION/fs/lib/firmware/ueagle-atm/CMV4p.bin || true
pascal@2167 79 ;;
pascal@2167 80 esac
pascal@2167 81
pascal@2167 82 # Create receipt
pascal@2167 83 cat > $PKG-$VERSION/receipt <<EOT
pascal@2167 84 PACKAGE="$PKG"
pascal@2167 85 VERSION="$VERSION"
pascal@2167 86 CATEGORY="non-free"
pascal@2167 87 SHORT_DESC="$SHORT_DESC."
pascal@2167 88 WEB_SITE="$WEB_SITE"
pascal@2167 89 EOT
pascal@2167 90
pascal@2167 91 # Pack
pascal@2167 92 tazpkg pack $PKG-$VERSION
pascal@2167 93
pascal@2167 94 # Install pseudo package
pascal@2167 95 tazpkg install $PKG-$VERSION.tazpkg --root=$ROOT
pascal@2167 96
pascal@2167 97 # Clean
pascal@2167 98 cd $TOP
pascal@2167 99 rm -rf $TMP