wok-stable view linmodem-slmodem/receipt @ rev 5504
Up: gtkhtml2_viewer (0.27)
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sat May 08 09:29:27 2010 +0200 (2010-05-08) |
parents | fe3602b923a8 |
children | b4b992b90e4a |
line source
1 # SliTaz package receipt.
3 PACKAGE="linmodem-slmodem"
4 VERSION="2.9.11-20100303"
5 CATEGORY="network"
6 MAINTAINER="jozee@slitaz.org"
7 SHORT_DESC="Drivers for the Smartlink winmodems"
8 BUILD_DEPENDS="linux lzma"
9 WEB_SITE="http://linmodems.technion.ac.il/packages/smartlink/"
10 SOURCE="slmodem"
11 TARBALL="$SOURCE-$VERSION.tar.gz"
12 WGET_URL="$WEB_SITE/$TARBALL"
13 TAGS=""
15 # Rules to configure and make the package.
17 compile_rules() {
19 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
20 [ -d $WOK/linux/taz ] || tazwok cook linux
22 [ -f ungrab-winmodem-20090716.tar.gz ] || wget $WEB_SITE/ungrab-winmodem-20090716.tar.gz
23 [ -d ungrab-winmodem-20090716 ] || tar -xzf ungrab-winmodem-20090716.tar.gz
24 cd ungrab-winmodem-20090716
25 make KERNEL_DIR=$WOK/linux/linux-$KERNEL_VERSION
26 cd $src
27 for i in utsrelease.h ; do
28 grep -rl linux/$i * | xargs sed -i "s|linux/$i|generated/$i|"
29 done
30 sed -i 's|^obj-m := slamr.o slusb.o|obj-m := slamr.o|' drivers/Makefile
31 make KERNEL_DIR=$WOK/linux/linux-$KERNEL_VERSION SUPPORT_ALSA=1 DESTDIR=$PWD/_pkg drivers
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
38 EXTRAVERSION=_$KERNEL_VERSION
40 mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net
42 # Compress and install module
43 lzma e $src/drivers/slamr.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/slamr.ko.gz
44 lzma e ungrab-winmodem-20090716/ungrab-winmodem.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz
45 chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/slamr.ko.gz
46 chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz
47 chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/slamr.ko.gz
48 chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz
50 }
52 post_install()
53 {
54 echo "Processing post-install commands..."
55 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
56 }
58 post_remove()
59 {
60 echo "Processing post-remove commands..."
61 depmod -a
62 }