wok-current annotate compat-wireless/receipt @ 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 | |
children | f306d126580e |
rev | line source |
---|---|
pascal@2590 | 1 # SliTaz package receipt. |
pascal@2590 | 2 |
pascal@2590 | 3 PACKAGE="compat-wireless" |
pascal@2590 | 4 VERSION="2009-04-08" |
pascal@2590 | 5 CATEGORY="base-system" |
pascal@2590 | 6 SHORT_DESC="Linux wireless driver update." |
pascal@2590 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@2590 | 8 WEB_SITE="http://wireless.kernel.org/" |
pascal@2590 | 9 TARBALL="$PACKAGE-old-$VERSION.tar.bz2" |
pascal@2590 | 10 WGET_URL="${WEB_SITE}download/$PACKAGE-2.6/$TARBALL" |
pascal@2590 | 11 BUILD_DEPENDS="lzma" |
pascal@2590 | 12 PROVIDE="linux-wireless" |
pascal@2590 | 13 |
pascal@2590 | 14 # Rules to configure and make the package. |
pascal@2590 | 15 compile_rules() |
pascal@2590 | 16 { |
pascal@2590 | 17 local kver |
pascal@2590 | 18 local kpath |
pascal@2590 | 19 |
pascal@2590 | 20 mv $PACKAGE-2.6-old $src 2> /dev/null |
pascal@2590 | 21 cd $src |
pascal@2590 | 22 # get kernel version |
pascal@2590 | 23 if [ ! -d $WOK/linux/taz ]; then |
pascal@2590 | 24 tazwok cook linux |
pascal@2590 | 25 fi |
pascal@2590 | 26 kpath=$WOK/linux/$(ls $WOK/linux/taz) |
pascal@2590 | 27 kver=$(grep "kernel version" $kpath/.config) |
pascal@2590 | 28 kver=${kver##* } |
pascal@2590 | 29 IFS='.'; set -- $kver ; unset IFS |
pascal@2590 | 30 if [ $1 -ne 2 -o $2 -ne 6 -o $3 -lt 22 -o $3 -gt 27 ]; then |
pascal@2590 | 31 cat <<EOT |
pascal@2590 | 32 Wrong linux version $kver |
pascal@2590 | 33 Supported versions are 2.6.22 - 2.6.27 |
pascal@2590 | 34 EOT |
pascal@2590 | 35 return 1 |
pascal@2590 | 36 fi |
pascal@2590 | 37 make KLIB=$kpath KLIB_BUILD=$kpath |
pascal@2590 | 38 make -C $kpath M=$PWD INSTALL_MOD_PATH=$PWD/_pkg modules_install |
pascal@2590 | 39 mkdir -p _pkg/usr/lib/compat-wireless/ _pkg/usr/sbin |
pascal@2590 | 40 $WOK/linux/stuff/gztazmod.sh _pkg/lib/modules/*-slitaz |
pascal@2590 | 41 cp scripts/modlib.sh _pkg/usr/lib/compat-wireless/ |
pascal@2590 | 42 cp scripts/*load scripts/*able _pkg/usr/sbin |
pascal@2590 | 43 } |
pascal@2590 | 44 |
pascal@2590 | 45 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@2590 | 46 genpkg_rules() |
pascal@2590 | 47 { |
pascal@2590 | 48 cp -a $_pkg/usr $_pkg/lib $fs |
pascal@2590 | 49 rm -f $fs/lib/modules/*-slitaz/modules.* |
pascal@2590 | 50 sed -i 's|/bin/bash|/bin/ash|' $_pkg/usr/sbin/* $_pkg/usr/lib/*/* |
pascal@2590 | 51 } |
pascal@2590 | 52 |
pascal@2590 | 53 # Post install/remove commands for Tazpkg. |
pascal@2590 | 54 post_install() |
pascal@2590 | 55 { |
pascal@2590 | 56 depmod -a -b "$1/" |
pascal@2590 | 57 } |
pascal@2590 | 58 |
pascal@2590 | 59 post_remove() |
pascal@2590 | 60 { |
pascal@2590 | 61 depmod -a |
pascal@2590 | 62 } |