wok-6.x view linmodem-slmodem/receipt @ rev 10083
Up: deadbeef to 0.5.0. Add $CONFIGURE_ARGS.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri May 20 06:27:03 2011 +0000 (2011-05-20) |
parents | b4b992b90e4a |
children | 51dc38f6efca |
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 ungrab=ungrab-winmodem-20090716
23 [ -f $SOURCES_REPOSITORY/$ungrab.tar.gz ] ||
24 wget $WEB_SITE/$ungrab.tar.gz -P $SOURCES_REPOSITORY
25 [ -d $ungrab ] || tar -xzf $SOURCES_REPOSITORY/$ungrab.tar.gz
26 cd $ungrab
27 make KERNEL_DIR=$WOK/linux/linux-$KERNEL_VERSION
28 cd $src
29 for i in utsrelease.h ; do
30 grep -rl linux/$i * | xargs sed -i "s|linux/$i|generated/$i|"
31 done
32 sed -i 's|^obj-m := slamr.o slusb.o|obj-m := slamr.o|' drivers/Makefile
33 sed -i 's/\.ioctl/.unlocked_ioctl/' drivers/amrmo_init.c
34 make KERNEL_DIR=$WOK/linux/linux-$KERNEL_VERSION SUPPORT_ALSA=1 DESTDIR=$PWD/_pkg drivers
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 KERNEL_VERSION=`grep ^VERSION= $WOK/linux/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
41 EXTRAVERSION=_$KERNEL_VERSION
43 mkdir -p $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net
45 # Compress and install module
46 lzma e $src/drivers/slamr.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/slamr.ko.gz
47 lzma e ungrab-winmodem-20090716/ungrab-winmodem.ko $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz
48 chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/slamr.ko.gz
49 chown root $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz
50 chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/slamr.ko.gz
51 chmod 0644 $fs/lib/modules/$KERNEL_VERSION-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz
53 }
55 post_install()
56 {
57 echo "Processing post-install commands..."
58 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz
59 }
61 post_remove()
62 {
63 echo "Processing post-remove commands..."
64 depmod -a
65 }