# HG changeset patch # User Rohit Joshi # Date 1260451737 0 # Node ID fe3602b923a8b931348178af0b864825aa6e262d # Parent a08d80807ccda405d7d388358bcbbd300510fe77 Add linmodem-slmodem diff -r a08d80807ccd -r fe3602b923a8 linmodem-slmodem/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/linmodem-slmodem/receipt Thu Dec 10 13:28:57 2009 +0000 @@ -0,0 +1,59 @@ +# SliTaz package receipt. + +PACKAGE="linmodem-slmodem" +VERSION="2.9.11-20090222" +CATEGORY="network" +MAINTAINER="jozee@slitaz.org" +SHORT_DESC="Drivers for the Smartlink winmodems" +BUILD_DEPENDS="linux lzma" +WEB_SITE="http://linmodems.technion.ac.il/packages/smartlink/" +SOURCE="slmodem" +TARBALL="$SOURCE-$VERSION.tar.gz" +WGET_URL="$WEB_SITE/$TARBALL" +TAGS="" + +# Rules to configure and make the package. + +compile_rules() { + + KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` + [ -d $WOK/linux/taz ] || tazwok cook linux + + [ -f ungrab-winmodem-20090716.tar.gz ] || wget $WEB_SITE/ungrab-winmodem-20090716.tar.gz + [ -d ungrab-winmodem-20090716 ] || tar -xzf ungrab-winmodem-20090716.tar.gz + cd ungrab-winmodem-20090716 + make KERNEL_DIR=$WOK/linux/linux-$KERNEL_VERSION + cd $src + sed -i 's|^obj-m := slamr.o slusb.o|obj-m := slamr.o|' drivers/Makefile + make KERNEL_DIR=$WOK/linux/linux-$KERNEL_VERSION SUPPORT_ALSA=1 DESTDIR=$PWD/_pkg drivers +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'` + EXTRAVERSION=_$KERNEL_VERSION + + mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net + + # Compress and install module + lzma e $src/drivers/slamr.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/slamr.ko.gz + lzma e ungrab-winmodem-20090716/ungrab-winmodem.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz + chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/slamr.ko.gz + chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz + chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/slamr.ko.gz + chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz + +} + +post_install() +{ + echo "Processing post-install commands..." + chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz +} + +post_remove() +{ + echo "Processing post-remove commands..." + depmod -a +}