wok-stable rev 4590

Add linmodem-slmodem
author Rohit Joshi <jozee@slitaz.org>
date Thu Dec 10 13:28:57 2009 +0000 (2009-12-10)
parents a08d80807ccd
children 190fae531539
files linmodem-slmodem/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/linmodem-slmodem/receipt	Thu Dec 10 13:28:57 2009 +0000
     1.3 @@ -0,0 +1,59 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="linmodem-slmodem"
     1.7 +VERSION="2.9.11-20090222"
     1.8 +CATEGORY="network"
     1.9 +MAINTAINER="jozee@slitaz.org"
    1.10 +SHORT_DESC="Drivers for the Smartlink winmodems"
    1.11 +BUILD_DEPENDS="linux lzma"
    1.12 +WEB_SITE="http://linmodems.technion.ac.il/packages/smartlink/"
    1.13 +SOURCE="slmodem"
    1.14 +TARBALL="$SOURCE-$VERSION.tar.gz"
    1.15 +WGET_URL="$WEB_SITE/$TARBALL"
    1.16 +TAGS=""
    1.17 +
    1.18 +# Rules to configure and make the package.
    1.19 +
    1.20 +compile_rules() {
    1.21 +    
    1.22 + KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    1.23 + [ -d $WOK/linux/taz ] || tazwok cook linux
    1.24 + 
    1.25 + [ -f ungrab-winmodem-20090716.tar.gz ] || wget $WEB_SITE/ungrab-winmodem-20090716.tar.gz
    1.26 + [ -d ungrab-winmodem-20090716 ] || tar -xzf ungrab-winmodem-20090716.tar.gz
    1.27 + cd ungrab-winmodem-20090716
    1.28 + make KERNEL_DIR=$WOK/linux/linux-$KERNEL_VERSION
    1.29 + cd $src
    1.30 +  sed -i 's|^obj-m := slamr.o slusb.o|obj-m := slamr.o|' drivers/Makefile
    1.31 +  make KERNEL_DIR=$WOK/linux/linux-$KERNEL_VERSION SUPPORT_ALSA=1 DESTDIR=$PWD/_pkg drivers
    1.32 +}
    1.33 +	
    1.34 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.35 +genpkg_rules()
    1.36 +{	
    1.37 +	KERNEL_VERSION=`grep  ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    1.38 +	EXTRAVERSION=_$KERNEL_VERSION
    1.39 +	
    1.40 +	mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net
    1.41 +	
    1.42 +	# Compress and install module
    1.43 +	lzma e $src/drivers/slamr.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/slamr.ko.gz
    1.44 +	lzma e ungrab-winmodem-20090716/ungrab-winmodem.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz
    1.45 +	chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/slamr.ko.gz
    1.46 +	chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz
    1.47 +	chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/slamr.ko.gz	
    1.48 +	chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz
    1.49 +		
    1.50 +}
    1.51 +
    1.52 +post_install()
    1.53 +{
    1.54 +	echo "Processing post-install commands..."
    1.55 +	chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
    1.56 +}
    1.57 +
    1.58 +post_remove()
    1.59 +{
    1.60 +	echo "Processing post-remove commands..."
    1.61 +	depmod -a
    1.62 +}