wok-next rev 3473
get-softmodem-driver: Add support for Smart Link modem
author | Dominique Corbex <domcox@users.sourceforge.net> |
---|---|
date | Tue Jun 16 21:41:05 2009 +0200 (2009-06-16) |
parents | a7cc1a9e59b6 |
children | eb04f16915c1 |
files | get-softmodem-driver/receipt get-softmodem-driver/stuff/get-softmodem-driver get-softmodem-driver/stuff/slmodem.init get-softmodem-driver/stuff/slmodem.receipt |
line diff
1.1 --- a/get-softmodem-driver/receipt Tue Jun 16 14:58:16 2009 +0000 1.2 +++ b/get-softmodem-driver/receipt Tue Jun 16 21:41:05 2009 +0200 1.3 @@ -1,11 +1,11 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="get-softmodem-driver" 1.7 -VERSION="0.6" 1.8 +VERSION="0.7" 1.9 CATEGORY="non-free" 1.10 SHORT_DESC="Get misc softmodem drivers." 1.11 MAINTAINER="domcox@slitaz.org" 1.12 -DEPENDS="cpio linux-source slitaz-toolchain" 1.13 +DEPENDS="alsa-lib-dev cpio linux-source slitaz-toolchain" 1.14 WEB_SITE="http://hg.slitaz.org/wok/file/$PACKAGE/stuff/$PACKAGE" 1.15 1.16 # Rules to gen a SliTaz package suitable for Tazpkg.
2.1 --- a/get-softmodem-driver/stuff/get-softmodem-driver Tue Jun 16 14:58:16 2009 +0000 2.2 +++ b/get-softmodem-driver/stuff/get-softmodem-driver Tue Jun 16 21:41:05 2009 +0200 2.3 @@ -25,6 +25,9 @@ 2.4 martian) 2.5 . /usr/share/softmodem/martian.receipt 2.6 echo "Support for the Agere Systems PCI Modem built on DSP 164x (Mars) series." ;; 2.7 +slmodem) 2.8 + . /usr/share/softmodem/slmodem.receipt 2.9 + echo "Support for the SmartLink Softmodem" ;; 2.10 *) 2.11 echo "Unknown modem driver. Please run one of the following commands:" 2.12 for i in $(cd $(dirname $0); ls get-*-driver); do 2.13 @@ -61,7 +64,7 @@ 2.14 2.15 # Get files 2.16 cd /usr/src 2.17 -echo "Checking for source tarball... " 2.18 +echo "Checking for source tarball... $WGET_URL" 2.19 if [ ! -f "$TARBALL" ]; then 2.20 wget $WGET_URL 2.21 # Exit if download failed to avoid errors. 2.22 @@ -106,6 +109,7 @@ 2.23 mv $src $fs/usr/src 2.24 ;; 2.25 hcfpcimodem) 2.26 + untested 2.27 # Rules to configure and make the package. 2.28 cd $src 2.29 echo "Apply $file..." 2.30 @@ -138,6 +142,28 @@ 2.31 cp -a kmodule/martian_dev.ko $fs/lib/modules/`uname -r`/martian 2.32 mkdir -p $fs/etc/init.d 2.33 cp -a /usr/share/softmodem/martian.init $fs/etc/init.d/martian 2.34 + rm -rf $src 2.35 + ;; 2.36 +slmodem) 2.37 + untested 2.38 + # build modules 2.39 + cd $src 2.40 + make clean 2.41 + make drivers 2.42 + # Build slmodemd with ALSA support 2.43 + cd modem 2.44 + make clean 2.45 + make SUPPORT_ALSA=1 2.46 + # install 2.47 + cd $src 2.48 + mkdir -p $fs/lib/modules/`uname -r`/slamr 2.49 + cp -a drivers/*ko $fs/lib/modules/`uname -r`/slamr 2.50 + mkdir -p $fs/usr/sbin 2.51 + cp -a modem/slmodemd $fs/usr/sbin 2.52 + mkdir -p $fs/etc/init.d 2.53 + cp -a /usr/share/softmodem/slmodem.init $fs/etc/init.d/slmodem 2.54 + rm -rf $src 2.55 + ;; 2.56 esac 2.57 2.58 # Create receipt
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/get-softmodem-driver/stuff/slmodem.init Tue Jun 16 21:41:05 2009 +0200 3.3 @@ -0,0 +1,62 @@ 3.4 +#!/bin/sh 3.5 +# /etc/init.d/slmodem: Start, stop and restart slmodemd deamon on SliTaz, at boot 3.6 +# time or with the command line. 3.7 +# 3.8 +# To start daemon at boot time, just put the right name in the $RUN_DAEMONS 3.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf. 3.10 +# 3.11 +. /etc/init.d/rc.functions 3.12 +. /etc/daemons.conf 3.13 + 3.14 +NAME=Smartlink modem 3.15 +DESC="Smart Link Modem deamon" 3.16 +DAEMON=/usr/sbin/slmodemd 3.17 +OPTIONS="" 3.18 +PIDFILE=/var/run/slmodemd.pid 3.19 + 3.20 +if [ `/sbin/lsmod | grep -c martian_dev}` -lt "1" ]; then 3.21 + echo "kernel module is not loaded!" 3.22 + exit 1 3.23 +fi 3.24 + 3.25 +case "$1" in 3.26 + start) 3.27 + if [ -f $PIDFILE ] ; then 3.28 + echo "$NAME already running." 3.29 + exit 1 3.30 + fi 3.31 + echo -n "Starting $DESC: $NAME... " 3.32 + $DAEMON $OPTIONS 3.33 + status 3.34 + echo `/sbin/pidof $DAEMON` > $PIDFILE 3.35 + ;; 3.36 + stop) 3.37 + if [ ! -f $PIDFILE ] ; then 3.38 + echo "$NAME is not running." 3.39 + exit 1 3.40 + fi 3.41 + echo -n "Stopping $DESC: $NAME... " 3.42 + kill `cat $PIDFILE` 3.43 + status 3.44 + ;; 3.45 + restart) 3.46 + if [ ! -f $PIDFILE ] ; then 3.47 + echo "$NAME is not running." 3.48 + exit 1 3.49 + fi 3.50 + echo -n "Restarting $DESC: $NAME... " 3.51 + kill `cat $PIDFILE` 3.52 + sleep 2 3.53 + $DAEMON $OPTIONS 3.54 + status 3.55 + echo `/sbin/pidof $DAEMON` > $PIDFILE 3.56 + ;; 3.57 + *) 3.58 + echo "" 3.59 + echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]" 3.60 + echo "" 3.61 + exit 1 3.62 + ;; 3.63 +esac 3.64 + 3.65 +exit 0
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/get-softmodem-driver/stuff/slmodem.receipt Tue Jun 16 21:41:05 2009 +0200 4.3 @@ -0,0 +1,19 @@ 4.4 +# SliTaz package receipt. 4.5 + 4.6 +PACKAGE="slmodem" 4.7 +VERSION="2.9.11-20090222" 4.8 +CATEGORY="non-free" 4.9 +SHORT_DESC="Modem driver for Smartlink Modem." 4.10 +MAINTAINER="domcox@slitaz.org" 4.11 +TARBALL="$PACKAGE-$VERSION.tar.gz" 4.12 +DEPENDS="module-init-tools linux-source" 4.13 +WEB_SITE="http://linmodems.technion.ac.il" 4.14 +WGET_URL="http://linmodems.technion.ac.il/packages/smartlink/$TARBALL" 4.15 + 4.16 +# Rules to gen a SliTaz package suitable for Tazpkg. 4.17 + 4.18 +post_install() 4.19 +{ 4.20 + depmod -a 4.21 + /sbin/modprobe slamr && /etc/init.d/slmodem start 4.22 +}