wok-6.x annotate linmodem-slmodem/receipt @ rev 13967
Add: pysolfc (2.0)
author | Claudinei Pereira <claudinei@slitaz.org> |
---|---|
date | Fri Feb 01 17:33:55 2013 -0200 (2013-02-01) |
parents | b9368eac086f |
children |
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@13278 | 13 BUILD_DEPENDS="linux-module-headers xz" |
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@12859 | 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@13278 | 42 cp $src/drivers/slamr.ko \ |
pascal@13278 | 43 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/ |
pascal@13278 | 44 xz $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/slamr.ko |
pascal@13278 | 45 cp ungrab-winmodem-20090716/ungrab-winmodem.ko \ |
pascal@13278 | 46 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/ |
pascal@13278 | 47 xz $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/ungrab-winmodem.ko |
pascal@13278 | 48 chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.xz |
pascal@13278 | 49 chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.xz |
pascal@10930 | 50 } |
pascal@10930 | 51 |
pascal@10930 | 52 post_install() |
pascal@10930 | 53 { |
pascal@10930 | 54 echo "Processing post-install commands..." |
pascal@10930 | 55 chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz |
pascal@10930 | 56 } |
pascal@10930 | 57 |
pascal@10930 | 58 post_remove() |
pascal@10930 | 59 { |
pascal@10930 | 60 echo "Processing post-remove commands..." |
pascal@10930 | 61 depmod -a |
pascal@10930 | 62 } |