#!/bin/sh
#
#  ltmodem-allstuff.sh
#
#  Automate dowloading, compiling and installing
#  Lucent WinModem 8.26a9 drivers for Linux.
#
#  Original location:
#  http://ilya-evseev.narod.ru/posix/linmodem
#
#  Author:
#  ilya_evseev AT mail TOCHKA ru
#
#  Last changed:
#  27 January 2004 MSK 15:53
#
set -e

echo "Step 1: installing compiler, library, utilities..."
sudo apt-get install gcc3.2 glibc-devel kernel24-headers make patch

echo "Step 2: downloading sources..."
mkdir ~/src && cd ~/src
wget -c http://www.physcip.uni-stuttgart.de/heby/ltmodem/ltmodem-8.26a9.tar.gz
tar xzf ltmodem-8.26a9.tar.gz
cd ltmodem-8.26a9

echo "Step 3: downloading and applying patch..."
wget http://ilya-evseev.narod.ru/posix/linmodem/ltmodem-8.26a9-alt1.patch
patch < ltmodem-8.26a9-alt1.patch

echo "Step 4: build, install, configure..."
sudo ./scanmodem
./build_module
sudo ./ltinst2
test -e /dev/modem && sudo rm -f /dev/modem
sudo ./autoload

## EOF ##
