wok-next rev 10658

linmodem-agrsm: use linux-module-headers to build
author Christophe Lincoln <pankso@slitaz.org>
date Fri May 27 07:05:15 2011 +0200 (2011-05-27)
parents 4bf96e2f81cb
children 8fe94ac4ccfc
files linmodem-agrsm/receipt
line diff
     1.1 --- a/linmodem-agrsm/receipt	Fri May 27 06:27:01 2011 +0200
     1.2 +++ b/linmodem-agrsm/receipt	Fri May 27 07:05:15 2011 +0200
     1.3 @@ -6,40 +6,37 @@
     1.4  CATEGORY="network"
     1.5  MAINTAINER="jozee@slitaz.org"
     1.6  SHORT_DESC="Agere Modem Drivers for 11c11040 chipsets"
     1.7 -BUILD_DEPENDS="linux lzma"
     1.8  WEB_SITE="http://linmodems.technion.ac.il/packages/ltmodem/11c11040"
     1.9  TARBALL="$SOURCE-$VERSION.tar.bz2"
    1.10  WGET_URL="$WEB_SITE/$TARBALL"
    1.11 -TAGS=""
    1.12 +
    1.13 +BUILD_DEPENDS="linux linux-module-headers lzma"
    1.14  
    1.15  # Rules to configure and make the package.
    1.16 -
    1.17 -compile_rules() {
    1.18 -	 
    1.19 - KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    1.20 - [ -d $WOK/linux/taz ] || tazwok cook linux
    1.21 - cd $src
    1.22 - sed -i -e 's/\([^_]\)usb_buffer_free/\1usb_free_coherent/' \
    1.23 -	-e 's/\([^_]\)usb_buffer_alloc/\1usb_alloc_coherent/' agrsoftmodem.c
    1.24 - make KERNEL_DIR=$WOK/linux/linux-$KERNEL_VERSION KRELEASE=$KERNEL_VERSION
    1.25 -  
    1.26 +compile_rules()
    1.27 +{
    1.28 +	KVERS=$(grep ^VERSION= $INSTALLED/linux/receipt | cut -d '"' -f 2)
    1.29 +	sed -i \
    1.30 +		-e 's/\([^_]\)usb_buffer_free/\1usb_free_coherent/' \
    1.31 +		-e 's/\([^_]\)usb_buffer_alloc/\1usb_alloc_coherent/' \
    1.32 +		agrsoftmodem.c
    1.33 +	make KERNEL_DIR=/usr/src/linux-$KVERS-slitaz KRELEASE=$KVERS
    1.34  }
    1.35  	
    1.36  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.37  genpkg_rules()
    1.38  {	
    1.39 -	KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    1.40 -	EXTRAVERSION=_$KERNEL_VERSION
    1.41 +	KVERS=$(grep ^VERSION= $INSTALLED/linux/receipt | cut -d '"' -f 2)
    1.42 +	EXTRAVERSION=_$KVERS
    1.43 +	echo "EXTRAVERSION: $EXTRAVERSION"
    1.44  	
    1.45 -	mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net
    1.46 +	mkdir -p $fs/lib/modules/$KVERS-slitaz/kernel/drivers/net
    1.47  	
    1.48  	# Compress and install module
    1.49 -	lzma e $src/agrmodem.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/agrmodem.ko.gz
    1.50 -	lzma e $src/agrserial.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/agrserial.ko.gz
    1.51 -	chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/agrmodem.ko.gz
    1.52 -	chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/agrmodem.ko.gz		
    1.53 -	chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/agrserial.ko.gz
    1.54 -	chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/agrserial.ko.gz			
    1.55 +	lzma e $src/agrmodem.ko $fs/lib/modules/$KVERS-slitaz/kernel/drivers/net/agrmodem.ko.gz
    1.56 +	lzma e $src/agrserial.ko $fs/lib/modules/$KVERS-slitaz/kernel/drivers/net/agrserial.ko.gz		
    1.57 +	chown root $fs/lib/modules/$KVERS-slitaz/kernel/drivers/net/*.ko.gz
    1.58 +	chmod 0644 $fs/lib/modules/$KVERS-slitaz/kernel/drivers/net/*.ko.gz			
    1.59  }
    1.60  
    1.61  post_install()