wok-next rev 7396
linmodem-hsfmodem: fix kernel version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Nov 26 18:52:20 2010 +0100 (2010-11-26) |
parents | fdee222eb84b |
children | 9ce59d5bc5b7 |
files | linmodem-hsfmodem/receipt |
line diff
1.1 --- a/linmodem-hsfmodem/receipt Fri Nov 26 13:29:45 2010 +0100 1.2 +++ b/linmodem-hsfmodem/receipt Fri Nov 26 18:52:20 2010 +0100 1.3 @@ -21,9 +21,10 @@ 1.4 echo "Apply $file..." 1.5 patch -p1 < ../stuff/$SOURCE-$VERSION.diff || exit 1 1.6 # set /usr/src/linux 1.7 - echo "Set fake /usr/src/linux dir..Ã" 1.8 + echo "Set fake /usr/src/linux dir..." 1.9 [ -e /usr/src ] && SRCDIR=yes || mkdir -p /usr/src 1.10 ln -s $WOK/linux/linux-$KERNEL_VERSION /usr/src/linux 1.11 + grep -rl 'uname -r' . | xargs sed -i "s/uname -r/echo $KERNEL_VERSION/g" 1.12 # build driver 1.13 echo "Build driver" 1.14 make ROOT=$PWD/_pkg install 1.15 @@ -40,11 +41,12 @@ 1.16 # Rules to gen a SliTaz package suitable for Tazpkg. 1.17 genpkg_rules() 1.18 { 1.19 + KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` 1.20 # kernel modules 1.21 - mkdir -p $fs/lib/modules/$(uname -r) 1.22 - cp -a /lib/modules/$(uname -r)/extra $fs/lib/modules/$(uname -r) 1.23 + mkdir -p $fs/lib/modules/$KERNEL_VERSION 1.24 + cp -a /lib/modules/$KERNEL_VERSION/extra $fs/lib/modules/$KERNEL_VERSION 1.25 # cleaning up 1.26 - rm -r /lib/modules/$(uname -r)/extra 1.27 + rm -r /lib/modules/$KERNEL_VERSION/extra 1.28 # command files 1.29 mkdir -p $fs/usr 1.30 cp -a $_pkg/usr/sbin $fs/usr