wok rev 10930
Add linmodem-slmodem
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Aug 20 22:16:05 2011 +0200 (2011-08-20) |
parents | fbb1603904fb |
children | 149e9a44c474 |
files | linmodem-slmodem/receipt |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/linmodem-slmodem/receipt Sat Aug 20 22:16:05 2011 +0200 1.3 @@ -0,0 +1,60 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="linmodem-slmodem" 1.7 +VERSION="2.9.11-20100303" 1.8 +CATEGORY="network" 1.9 +MAINTAINER="jozee@slitaz.org" 1.10 +SHORT_DESC="Drivers for the Smartlink winmodems" 1.11 +WEB_SITE="http://linmodems.technion.ac.il/packages/smartlink/" 1.12 +SOURCE="slmodem" 1.13 +TARBALL="$SOURCE-$VERSION.tar.gz" 1.14 +WGET_URL="$WEB_SITE/$TARBALL" 1.15 + 1.16 +BUILD_DEPENDS="linux-module-headers lzma" 1.17 + 1.18 +# Rules to configure and make the package. 1.19 + 1.20 +compile_rules() { 1.21 + ungrab=ungrab-winmodem-20090716 1.22 + [ -f $SOURCES_REPOSITORY/$ungrab.tar.gz ] || 1.23 + wget $WEB_SITE/$ungrab.tar.gz -P $SOURCES_REPOSITORY 1.24 + [ -d $ungrab ] || tar -xzf $SOURCES_REPOSITORY/$ungrab.tar.gz 1.25 + cd $ungrab 1.26 + make KERNEL_DIR=/usr/src/linux 1.27 + cd $src 1.28 + for i in utsrelease.h ; do 1.29 + grep -rl linux/$i * | xargs sed -i "s|linux/$i|generated/$i|" 1.30 + done 1.31 + sed -i 's|^obj-m := slamr.o slusb.o|obj-m := slamr.o|' drivers/Makefile 1.32 + sed -i 's/\.ioctl/.unlocked_ioctl/' drivers/amrmo_init.c 1.33 + sed -i -e 's/DECLARE_MUTEX/DEFINE_SEMAPHORE/' \ 1.34 + -e 's/init_MUTEX\([^)]*\)/sema_init\1, 1/' drivers/st7554.c 1.35 + make KERNEL_DIR=/usr/src/linux SUPPORT_ALSA=1 DESTDIR=$DESTDIR drivers 1.36 +} 1.37 + 1.38 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.39 +genpkg_rules() 1.40 +{ 1.41 + EXTRAVERSION=_${kvers} 1.42 + mkdir -p $fs/lib/modules/$kvers-slitaz/kernel/drivers/net 1.43 + 1.44 + # Compress and install module 1.45 + lzma e $src/drivers/slamr.ko \ 1.46 + $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/slamr.ko.gz 1.47 + lzma e ungrab-winmodem-20090716/ungrab-winmodem.ko \ 1.48 + $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/ungrab-winmodem.ko.gz 1.49 + chown root $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.gz 1.50 + chmod 0644 $fs/lib/modules/$kvers-slitaz/kernel/drivers/net/*.ko.gz 1.51 +} 1.52 + 1.53 +post_install() 1.54 +{ 1.55 + echo "Processing post-install commands..." 1.56 + chroot "$1/" depmod -a ${EXTRAVERSION#_}-slitaz 1.57 +} 1.58 + 1.59 +post_remove() 1.60 +{ 1.61 + echo "Processing post-remove commands..." 1.62 + depmod -a 1.63 +}