wok-6.x view get-softmodem-driver/stuff/martian.receipt @ rev 20319

Up tazlito (501)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun May 20 13:28:18 2018 +0200 (2018-05-20)
parents
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="domcox@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 DEPENDS="module-init-tools linux-source"
10 WEB_SITE="http://martian.barrelsoutofbond.org"
11 WGET_URL="http://www.barrelsoutofbond.org/downloads/$PACKAGE/$TARBALL"
13 # Rules to gen a SliTaz package suitable for Tazpkg.
15 post_install()
16 {
17 # Country settings
18 if [ -e /etc/TZ ]; then
19 ZONE=`cat /etc/TZ`
20 CODE=`grep $ZONE /usr/share/martian/zone.tab | cut -f1'`
21 if [ -n $CODE ]; then
22 COUNTRY=`grep ^$CODE /usr/share/martian/martian.country | cut -f2`
23 COUNTRY_NAME=`grep ^$CODE /usr/share/martian/martian.country | cut -f3`
24 fi
25 fi
26 if [ -z $COUNTRY ]; then
27 COUNTRY="us"
28 COUNTRY_NAME="USA"
29 fi
30 echo "Automatic country setting: $COUNTRY_NAME"
31 # Save options
32 if [ `grep -c MARTIAN_OPTIONS /etc/daemons.conf` -gt 0 ]; then
33 sed -i 's/MARTIAN_OPTIONS=.*/MARTIAN_OPTIONS="--country='"$COUNTRY"' \/dev\/ttySM0"/' /etc/daemons.conf
34 else
35 echo "# slmodemd daemon options." >> $root/etc/daemons.conf
36 echo "MARTIAN_OPTIONS=\"--country=$COUNTRY /dev/ttySM0\"" >> $root/etc/daemons.conf
37 echo >> $root/etc/daemons.conf
38 fi
39 # Load module
40 /sbin/depmod -a
41 /sbin/modprobe martian_dev && \
42 /etc/init.d/martian start
43 }
45 post_remove()
46 {
47 /etc/init.d/martian stop
48 rm -rf /usr/share/martian
49 }