wok-next view get-softmodem-driver/stuff/martian.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="martian"
4 VERSION="full-20080617"
5 CATEGORY="non-free"
6 SHORT_DESC="Driver for the Agere Systems PCI Modem built on DSP 164x (Mars) series."
7 MAINTAINER="devel@slitaz.org"
8 WEB_SITE="http://martian.barrelsoutofbond.org"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WGET_URL="http://www.barrelsoutofbond.org/downloads/$PACKAGE/$TARBALL"
13 DEPENDS="module-init-tools linux-source"
15 post_install() {
16 # Country settings
17 if [ -e /etc/TZ ]; then
18 ZONE=$(cat /etc/TZ)
19 CODE=$(grep $ZONE /usr/share/martian/zone.tab | cut -f1)
20 if [ -n $CODE ]; then
21 COUNTRY=$(grep ^$CODE /usr/share/martian/martian.country | cut -f2)
22 COUNTRY_NAME=$(grep ^$CODE /usr/share/martian/martian.country | cut -f3)
23 fi
24 fi
25 if [ -z $COUNTRY ]; then
26 COUNTRY="us"
27 COUNTRY_NAME="USA"
28 fi
29 echo "Automatic country setting: $COUNTRY_NAME"
30 # Save options
31 if [ $(grep -c MARTIAN_OPTIONS /etc/daemons.conf) -gt 0 ]; then
32 sed -i 's/MARTIAN_OPTIONS=.*/MARTIAN_OPTIONS="--country='"$COUNTRY"' \/dev\/ttySM0"/' /etc/daemons.conf
33 else
34 echo "# slmodemd daemon options." >> $root/etc/daemons.conf
35 echo "MARTIAN_OPTIONS=\"--country=$COUNTRY /dev/ttySM0\"" >> $root/etc/daemons.conf
36 echo >> $root/etc/daemons.conf
37 fi
38 # Load module
39 /sbin/depmod -a
40 /sbin/modprobe martian_dev &&
41 /etc/init.d/martian start
42 }
44 post_remove() {
45 /etc/init.d/martian stop
46 rm -rf /usr/share/martian
47 }