wok-next view get-softmodem-driver/stuff/slmodem.receipt @ rev 21727
created recipe for vbindiff
author | Hans-G?nter Theisgen |
---|---|
date | Sat Nov 21 14:32:44 2020 +0100 (2020-11-21) |
parents | 4aed2b24febc |
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="devel@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 post_install() {
14 # Country detection
15 if [ -e /etc/TZ ]; then
16 ZONE=$(cat /etc/TZ)
17 CODE=$(grep $ZONE /usr/share/slmodem/zone.tab | cut -f1)
18 if [ -n $CODE ]; then
19 COUNTRY=$(grep ^$CODE /usr/share/slmodem/slmodem.country | cut -f2)
20 fi
21 fi
22 if [ -z $COUNTRY ]; then
23 COUNTRY="USA"
24 fi
25 echo "Automatic country setting: $COUNTRY"
26 # Save options
27 if [ $(grep -c SLMODEM_OPTIONS /etc/daemons.conf) -gt 0 ]; then
28 sed -i 's/SLMODEM_OPTIONS=.*/SLMODEM_OPTIONS="--country='"$COUNTRY"' \/dev\/slamr0"/' /etc/daemons.conf
29 else
30 echo "# slmodemd daemon options." >> $root/etc/daemons.conf
31 echo "SLMODEM_OPTIONS=\"--country=$COUNTRY /dev/slamr0\"" >> $root/etc/daemons.conf
32 echo >> $root/etc/daemons.conf
33 fi
34 # Load module
35 depmod -a
36 /sbin/modprobe slamr && /etc/init.d/slmodem start
37 }
39 post_remove()
40 {
41 /etc/init.d/slmodem stop
42 rm -rf /usr/share/slmodem
43 }