wok-next rev 1029

Add get-ipw2100-firmware and get-ipw2200-firmware
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jul 10 20:09:55 2008 +0000 (2008-07-10)
parents 526cc3106c1e
children cd9d437a5a0f
files get-ipw2100-firmware/receipt get-ipw2100-firmware/stuff/get-ipw2100-firmware get-ipw2200-firmware/receipt get-ipw2200-firmware/stuff/get-ipw2200-firmware
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/get-ipw2100-firmware/receipt	Thu Jul 10 20:09:55 2008 +0000
     1.3 @@ -0,0 +1,15 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="get-ipw2100-firmware"
     1.7 +VERSION="1.0"
     1.8 +CATEGORY="non-free"
     1.9 +SHORT_DESC="Get Intel PRO/Wireless 2100 firmware."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +WEB_SITE="http://ipw2100.sourceforge.net//"
    1.12 +
    1.13 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.14 +genpkg_rules()
    1.15 +{
    1.16 +	mkdir -p $fs/usr/bin
    1.17 +	cp stuff/$PACKAGE $fs/usr/bin
    1.18 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/get-ipw2100-firmware/stuff/get-ipw2100-firmware	Thu Jul 10 20:09:55 2008 +0000
     2.3 @@ -0,0 +1,77 @@
     2.4 +# install linux-wireless if needed.
     2.5 +
     2.6 +MODULE=ipw2100
     2.7 +PKG=$MODULE-firmware
     2.8 +VERSION=1.3-6.0.1
     2.9 +SHORT_DESC="Intel PRO/Wireless 2100 firmware."
    2.10 +WEB_SITE="http://$MODULE.sourceforge.net/"
    2.11 +RPM=$PKG-$VERSION.noarch.rpm
    2.12 +WGET_URL="http://dl.atrpms.net/all/$RPM"
    2.13 +
    2.14 +# Check if user is root to install.
    2.15 +if test $(id -u) != 0 ; then
    2.16 +        echo -e "\nYou must be root to run `basename $0`."
    2.17 +	echo -e "Please use 'su' and root password to become super-user.\n"
    2.18 +	exit 0
    2.19 +fi
    2.20 +
    2.21 +# Avoid reinstall
    2.22 +if [ -d /var/lib/tazpkg/installed/$PKG ]; then
    2.23 +	echo -e "\n$PKG package is already installed.\n"
    2.24 +	exit 0
    2.25 +fi
    2.26 +
    2.27 +# We need drivers and tools.
    2.28 +for pkg in linux-wireless wireless_tools
    2.29 +do
    2.30 +        if [ ! -d /var/lib/tazpkg/installed/$pkg ]; then
    2.31 +		tazpkg get-install $pkg
    2.32 +	fi
    2.33 +done
    2.34 +
    2.35 +# Get files
    2.36 +TMP=/tmp/$(basename $0)$$
    2.37 +mkdir $TMP
    2.38 +TOP=$PWD
    2.39 +cd $TMP
    2.40 +wget $WGET_URL
    2.41 +rpm2cpio < $RPM | cpio -id
    2.42 +	
    2.43 +# Create pseudo package
    2.44 +mkdir -p $PKG-$VERSION/fs/lib/firmware
    2.45 +rm -f lib/firmware/*LICENSE*
    2.46 +mv lib/firmware/* $PKG-$VERSION/fs/lib/firmware
    2.47 +
    2.48 +# Creat receipt
    2.49 +cat > $PKG-$VERSION/receipt <<EOT
    2.50 +PACKAGE="$PKG"
    2.51 +VERSION="$VERSION"
    2.52 +CATEGORY="non-free"
    2.53 +SHORT_DESC="$SHORT_DESC."
    2.54 +WEB_SITE="$WEB_SITE"
    2.55 +EOT
    2.56 +
    2.57 +# Pack
    2.58 +tazpkg pack $PKG-$VERSION
    2.59 +
    2.60 +# Install pseudo package
    2.61 +tazpkg install $PKG-$VERSION.tazpkg
    2.62 +
    2.63 +# Clean
    2.64 +cd $TOP
    2.65 +rm -rf $TMP
    2.66 +
    2.67 +# Load module
    2.68 +echo "Loading module: $MODULE..."
    2.69 +modprobe $MODULE
    2.70 +sleep 1
    2.71 +
    2.72 +# Configure /etc/network.conf and start connexion
    2.73 +sed -i s/'WIFI="no"'/'WIFI="yes"'/ /etc/network.conf
    2.74 +. /etc/network.conf
    2.75 +
    2.76 +iwconfig $WIFI_INTERFACE essid $ESSID
    2.77 +echo "Starting udhcpc client on: $WIFI_INTERFACE... "
    2.78 +/sbin/udhcpc -b -i $WIFI_INTERFACE \
    2.79 +        -p /var/run/udhcpc.$WIFI_INTERFACE.pid
    2.80 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/get-ipw2200-firmware/receipt	Thu Jul 10 20:09:55 2008 +0000
     3.3 @@ -0,0 +1,15 @@
     3.4 +# SliTaz package receipt.
     3.5 +
     3.6 +PACKAGE="get-ipw2200-firmware"
     3.7 +VERSION="1.0"
     3.8 +CATEGORY="non-free"
     3.9 +SHORT_DESC="Get Intel PRO/Wireless 2200BG firmware."
    3.10 +MAINTAINER="pascal.bellard@slitaz.org"
    3.11 +WEB_SITE="http://ipw2200.sourceforge.net//"
    3.12 +
    3.13 +# Rules to gen a SliTaz package suitable for Tazpkg.
    3.14 +genpkg_rules()
    3.15 +{
    3.16 +	mkdir -p $fs/usr/bin
    3.17 +	cp stuff/$PACKAGE $fs/usr/bin
    3.18 +}
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/get-ipw2200-firmware/stuff/get-ipw2200-firmware	Thu Jul 10 20:09:55 2008 +0000
     4.3 @@ -0,0 +1,77 @@
     4.4 +# install linux-wireless if needed.
     4.5 +
     4.6 +MODULE=ipw2200
     4.7 +PKG=$MODULE-firmware
     4.8 +VERSION=3.0-9.0.1
     4.9 +SHORT_DESC="Intel PRO/Wireless 2200BG firmware."
    4.10 +WEB_SITE="http://$MODULE.sourceforge.net/"
    4.11 +RPM=$PKG-$VERSION.noarch.rpm
    4.12 +WGET_URL="http://dl.atrpms.net/all/$RPM"
    4.13 +
    4.14 +# Check if user is root to install.
    4.15 +if test $(id -u) != 0 ; then
    4.16 +        echo -e "\nYou must be root to run `basename $0`."
    4.17 +	echo -e "Please use 'su' and root password to become super-user.\n"
    4.18 +	exit 0
    4.19 +fi
    4.20 +
    4.21 +# Avoid reinstall
    4.22 +if [ -d /var/lib/tazpkg/installed/$PKG ]; then
    4.23 +	echo -e "\n$PKG package is already installed.\n"
    4.24 +	exit 0
    4.25 +fi
    4.26 +
    4.27 +# We need drivers and tools.
    4.28 +for pkg in linux-wireless wireless_tools
    4.29 +do
    4.30 +        if [ ! -d /var/lib/tazpkg/installed/$pkg ]; then
    4.31 +		tazpkg get-install $pkg
    4.32 +	fi
    4.33 +done
    4.34 +
    4.35 +# Get files
    4.36 +TMP=/tmp/$(basename $0)$$
    4.37 +mkdir $TMP
    4.38 +TOP=$PWD
    4.39 +cd $TMP
    4.40 +wget $WGET_URL
    4.41 +rpm2cpio < $RPM | cpio -id
    4.42 +	
    4.43 +# Create pseudo package
    4.44 +mkdir -p $PKG-$VERSION/fs/lib/firmware
    4.45 +rm -f lib/firmware/*LICENSE*
    4.46 +mv lib/firmware/* $PKG-$VERSION/fs/lib/firmware
    4.47 +
    4.48 +# Creat receipt
    4.49 +cat > $PKG-$VERSION/receipt <<EOT
    4.50 +PACKAGE="$PKG"
    4.51 +VERSION="$VERSION"
    4.52 +CATEGORY="non-free"
    4.53 +SHORT_DESC="$SHORT_DESC."
    4.54 +WEB_SITE="$WEB_SITE"
    4.55 +EOT
    4.56 +
    4.57 +# Pack
    4.58 +tazpkg pack $PKG-$VERSION
    4.59 +
    4.60 +# Install pseudo package
    4.61 +tazpkg install $PKG-$VERSION.tazpkg
    4.62 +
    4.63 +# Clean
    4.64 +cd $TOP
    4.65 +rm -rf $TMP
    4.66 +
    4.67 +# Load module
    4.68 +echo "Loading module: $MODULE..."
    4.69 +modprobe $MODULE
    4.70 +sleep 1
    4.71 +
    4.72 +# Configure /etc/network.conf and start connexion
    4.73 +sed -i s/'WIFI="no"'/'WIFI="yes"'/ /etc/network.conf
    4.74 +. /etc/network.conf
    4.75 +
    4.76 +iwconfig $WIFI_INTERFACE essid $ESSID
    4.77 +echo "Starting udhcpc client on: $WIFI_INTERFACE... "
    4.78 +/sbin/udhcpc -b -i $WIFI_INTERFACE \
    4.79 +        -p /var/run/udhcpc.$WIFI_INTERFACE.pid
    4.80 +