wok-current annotate linmodem-slmodem/receipt @ rev 11194
Up: leocad to 0.75.2.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu Nov 03 03:12:43 2011 +0000 (2011-11-03) |
parents | |
children | b9368eac086f |
rev | line source |
---|---|
pascal@10930 | 1 # SliTaz package receipt. |
pascal@10930 | 2 |
pascal@10930 | 3 PACKAGE="linmodem-slmodem" |
pascal@10930 | 4 VERSION="2.9.11-20100303" |
pascal@10930 | 5 CATEGORY="network" |
pascal@10930 | 6 MAINTAINER="jozee@slitaz.org" |
pascal@10930 | 7 SHORT_DESC="Drivers for the Smartlink winmodems" |
pascal@10930 | 8 WEB_SITE="http://linmodems.technion.ac.il/packages/smartlink/" |
pascal@10930 | 9 SOURCE="slmodem" |
pascal@10930 | 10 TARBALL="$SOURCE-$VERSION.tar.gz" |
pascal@10930 | 11 WGET_URL="$WEB_SITE/$TARBALL" |
pascal@10930 | 12 |
pascal@10930 | 13 BUILD_DEPENDS="linux-module-headers lzma" |
pascal@10930 | 14 |
pascal@10930 | 15 # Rules to configure and make the package. |
pascal@10930 | 16 |
pascal@10930 | 17 compile_rules() { |
pascal@10930 | 18 ungrab=ungrab-winmodem-20090716 |
pascal@10930 | 19 [ -f $SOURCES_REPOSITORY/$ungrab.tar.gz ] || |
pascal@10930 | 20 wget $WEB_SITE/$ungrab.tar.gz -P $SOURCES_REPOSITORY |
pascal@10930 | 21 [ -d $ungrab ] || tar -xzf $SOURCES_REPOSITORY/$ungrab.tar.gz |
pascal@10930 | 22 cd $ungrab |
pascal@10930 | 23 make KERNEL_DIR=/usr/src/linux |
pascal@10930 | 24 cd $src |
pascal@10930 | 25 for i in utsrelease.h ; do |
pascal@10930 | 26 grep -rl linux/$i * | xargs sed -i "s|linux/$i|generated/$i|" |
pascal@10930 | 27 done |
pascal@10930 | 28 sed -i 's|^obj-m := slamr.o slusb.o|obj-m := slamr.o|' drivers/Makefile |
pascal@10930 | 29 sed -i 's/\.ioctl/.unlocked_ioctl/' drivers/amrmo_init.c |
pascal@10930 | 30 sed -i -e 's/DECLARE_MUTEX/DEFINE_SEMAPHORE/' \ |
pascal@10930 | 31 -e 's/init_MUTEX\([^)]*\)/sema_init\1, 1/' drivers/st7554.c |
pascal@10930 | 32 make KERNEL_DIR=/usr/src/linux SUPPORT_ALSA=1 DESTDIR=$DESTDIR drivers |
pascal@10930 | 33 } |
pascal@10930 | 34 |
pascal@10930 | 35 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@10930 | 36 genpkg_rules() |
pascal@10930 | 37 { |
pascal@10930 | 38 EXTRAVERSION=_${kvers} |
pascal@10930 | 39 mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/drivers/net |
pascal@10930 | 40 |
pascal@10930 | 41 # Compress and install module |
pascal@10930 | 42 lzma e $src/drivers/slamr.ko \ |
pascal@10930 | 43 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/slamr.ko.gz |
pascal@10930 | 44 lzma e ungrab-winmodem-20090716/ungrab-winmodem.ko \ |
pascal@10930 | 45 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz |
pascal@10930 | 46 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.gz |
pascal@10930 | 47 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.gz |
pascal@10930 | 48 } |
pascal@10930 | 49 |
pascal@10930 | 50 post_install() |
pascal@10930 | 51 { |
pascal@10930 | 52 echo "Processing post-install commands..." |
pascal@10930 | 53 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz |
pascal@10930 | 54 } |
pascal@10930 | 55 |
pascal@10930 | 56 post_remove() |
pascal@10930 | 57 { |
pascal@10930 | 58 echo "Processing post-remove commands..." |
pascal@10930 | 59 depmod -a |
pascal@10930 | 60 } |