wok-next view get-softmodem-driver/stuff/martian.receipt @ rev 21020

Cleaning is almost finished... I should proceed to upgrades.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 02 14:15:08 2018 +0200 (2018-11-02)
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 }