wok-next view get-softmodem-driver/stuff/slmodem.receipt @ rev 10087
Up: cairomm to 1.10.0.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Fri May 20 06:56:28 2011 +0000 (2011-05-20) |
parents | 8fc90d8b565b |
children |
line source
1 # SliTaz package receipt.
3 PACKAGE="slmodem"
4 VERSION="2.9.11-20090222"
5 CATEGORY="non-free"
6 SHORT_DESC="Support for the SmartLink Softmodem and ALSA supported chipsets."
7 MAINTAINER="domcox@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 DEPENDS="alsa-lib module-init-tools linux-source"
10 WEB_SITE="http://linmodems.technion.ac.il"
11 WGET_URL="http://linmodems.technion.ac.il/packages/smartlink/$TARBALL"
13 # Rules to gen a SliTaz package suitable for Tazpkg.
15 post_install()
16 {
17 # Country detection
18 if [ -e /etc/TZ ]; then
19 ZONE=`cat /etc/TZ`
20 CODE=`grep $ZONE /usr/share/slmodem/zone.tab | cut -f1'`
21 if [ -n $CODE ]; then
22 COUNTRY=`grep ^$CODE /usr/share/slmodem/slmodem.country | cut -f2`
23 fi
24 fi
25 if [ -z $COUNTRY ]; then
26 COUNTRY="USA"
27 fi
28 echo "Automatic country setting: $COUNTRY"
29 # Save options
30 if [ `grep -c SLMODEM_OPTIONS /etc/daemons.conf` -gt 0 ]; then
31 sed -i 's/SLMODEM_OPTIONS=.*/SLMODEM_OPTIONS="--country='"$COUNTRY"' \/dev\/slamr0"/' /etc/daemons.conf
32 else
33 echo "# slmodemd daemon options." >> $root/etc/daemons.conf
34 echo "SLMODEM_OPTIONS=\"--country=$COUNTRY /dev/slamr0\"" >> $root/etc/daemons.conf
35 echo >> $root/etc/daemons.conf
36 fi
37 # Load module
38 depmod -a
39 /sbin/modprobe slamr && /etc/init.d/slmodem start
40 }
42 post_remove()
43 {
44 /etc/init.d/slmodem stop
45 rm -rf /usr/share/slmodem
46 }