wok rev 2590

Add compat-wireless
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Apr 08 11:34:31 2009 +0000 (2009-04-08)
parents 12658e6aaeba
children 99ea393f53c2
files compat-wireless/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/compat-wireless/receipt	Wed Apr 08 11:34:31 2009 +0000
     1.3 @@ -0,0 +1,62 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="compat-wireless"
     1.7 +VERSION="2009-04-08"
     1.8 +CATEGORY="base-system"
     1.9 +SHORT_DESC="Linux wireless driver update."
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +WEB_SITE="http://wireless.kernel.org/"
    1.12 +TARBALL="$PACKAGE-old-$VERSION.tar.bz2"
    1.13 +WGET_URL="${WEB_SITE}download/$PACKAGE-2.6/$TARBALL"
    1.14 +BUILD_DEPENDS="lzma"
    1.15 +PROVIDE="linux-wireless"
    1.16 +
    1.17 +# Rules to configure and make the package.
    1.18 +compile_rules()
    1.19 +{
    1.20 +	local kver
    1.21 +	local kpath
    1.22 +
    1.23 +	mv $PACKAGE-2.6-old $src 2> /dev/null
    1.24 +	cd $src
    1.25 +	# get kernel version
    1.26 +	if [ ! -d $WOK/linux/taz ]; then
    1.27 +		tazwok cook linux
    1.28 +	fi
    1.29 +	kpath=$WOK/linux/$(ls $WOK/linux/taz)
    1.30 +	kver=$(grep "kernel version" $kpath/.config)
    1.31 +	kver=${kver##* }
    1.32 +	IFS='.'; set -- $kver ; unset IFS
    1.33 +	if [ $1 -ne 2 -o $2 -ne 6 -o $3 -lt 22 -o $3 -gt 27 ]; then
    1.34 +		cat <<EOT
    1.35 +Wrong linux version $kver
    1.36 +Supported versions are 2.6.22 - 2.6.27
    1.37 +EOT
    1.38 +		return 1
    1.39 +	fi
    1.40 +	make KLIB=$kpath KLIB_BUILD=$kpath
    1.41 +	make -C $kpath M=$PWD INSTALL_MOD_PATH=$PWD/_pkg modules_install
    1.42 +	mkdir -p _pkg/usr/lib/compat-wireless/ _pkg/usr/sbin
    1.43 +	$WOK/linux/stuff/gztazmod.sh _pkg/lib/modules/*-slitaz
    1.44 +	cp scripts/modlib.sh _pkg/usr/lib/compat-wireless/
    1.45 +	cp scripts/*load scripts/*able _pkg/usr/sbin
    1.46 +}
    1.47 +
    1.48 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.49 +genpkg_rules()
    1.50 +{
    1.51 +	cp -a $_pkg/usr $_pkg/lib $fs
    1.52 +	rm -f $fs/lib/modules/*-slitaz/modules.*
    1.53 +	sed -i 's|/bin/bash|/bin/ash|' $_pkg/usr/sbin/* $_pkg/usr/lib/*/*
    1.54 +}
    1.55 +
    1.56 +# Post install/remove commands for Tazpkg.
    1.57 +post_install()
    1.58 +{
    1.59 +	depmod -a -b "$1/"
    1.60 +}
    1.61 +
    1.62 +post_remove()
    1.63 +{
    1.64 +	depmod -a
    1.65 +}