summaryrefslogtreecommitdiff
blob: d660c2381a0c126b568f6ac8839c51ade0559eb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header $

EAPI="4"
inherit linux-mod eutils

ARCHRUMP="${PN}-full-${PV}"
DESCRIPTION="Winmodems with Lucent Apollo (ISA) and Mars (PCI) chipsets"
HOMEPAGE="http://linmodems.technion.ac.il/"
SRC_URI="http://linmodems.technion.ac.il/packages/ltmodem/kernel-2.6/martian/${ARCHRUMP}.tar.gz"

LICENSE="GPL-2 AgereSystems-WinModem"
KEYWORDS="-* ~x86"
IUSE=""

RESTRICT="mirror strip"

DEPEND=""
RDEPEND=""

S="${WORKDIR}/${ARCHRUMP}"

MODULE_NAMES="martian_dev(ltmodem::kmodule)"
CONFIG_CHECK="SERIAL_8250"
SERIAL_8250_ERROR="This driver requires you to compile your kernel with serial core (CONFIG_SERIAL_8250) support."

pkg_setup() {
	linux-mod_pkg_setup

	if kernel_is 2 4
	then	eerror "This driver works only with 2.6 kernels!"
		die "unsupported kernel detected"
	fi

	BUILD_TARGETS="all"
	BUILD_PARAMS="KERNEL_DIR='${KV_DIR}' SUBLEVEL='${KV_PATCH}'"
}

src_install() {
	# install kernel module
	linux-mod_src_install
	dosbin modem/martian_modem
}

pkg_postinst() {
	linux-mod_pkg_postinst

	[ "$ROOT" = "/" ] && /sbin/update-modules

	ewarn
	ewarn "To make the modem available modprobe martian_dev and run \"martian_modem\"."
	ewarn "This will make the modem available as /dev/ttySM0."
	ewarn "When using wvdial add \"Carrier Check = no\" line."

	if linux_chkconfig_present SMP
	then	ewarn
		ewarn "Please note that Linux support for SMP (symmetric multi processor)"
		ewarn "is reported to be incompatible with this driver!"
		ewarn "In case it doesn't work, you should try first to disable CONFIG_SMP in your kernel."
	fi
}