summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-dialup')
-rw-r--r--net-dialup/martian-modem/ChangeLog (renamed from net-dialup/martian/ChangeLog)5
-rw-r--r--net-dialup/martian-modem/Manifest (renamed from net-dialup/martian/Manifest)0
-rw-r--r--net-dialup/martian-modem/files/martian-modem-20100123-grsecurity.patch (renamed from net-dialup/martian/files/grsecurity.patch)0
-rw-r--r--net-dialup/martian-modem/files/martian-modem-20100123-makefile.patch34
-rw-r--r--net-dialup/martian-modem/files/martian-modem.conf.d45
-rw-r--r--net-dialup/martian-modem/files/martian-modem.init.d50
-rw-r--r--net-dialup/martian-modem/martian-modem-20100123.ebuild85
-rw-r--r--net-dialup/martian-modem/metadata.xml13
-rw-r--r--net-dialup/martian/martian-20100123.ebuild61
-rw-r--r--net-dialup/martian/metadata.xml8
10 files changed, 231 insertions, 70 deletions
diff --git a/net-dialup/martian/ChangeLog b/net-dialup/martian-modem/ChangeLog
index 3206d757..9894889d 100644
--- a/net-dialup/martian/ChangeLog
+++ b/net-dialup/martian-modem/ChangeLog
@@ -1,7 +1,10 @@
-# ChangeLog for net-dialup/martian
+# ChangeLog for net-dialup/martian-modem
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 16 Dec 2012; Martin Väth <martin@mvath.de>
+ Use from main Gentoo tree but keep grsecurity patch.
+
21 Sep 2012; Martin Väth <martin@mvath.de>
Bump to EAPI=5
diff --git a/net-dialup/martian/Manifest b/net-dialup/martian-modem/Manifest
index 5774fade..5774fade 100644
--- a/net-dialup/martian/Manifest
+++ b/net-dialup/martian-modem/Manifest
diff --git a/net-dialup/martian/files/grsecurity.patch b/net-dialup/martian-modem/files/martian-modem-20100123-grsecurity.patch
index 332680d9..332680d9 100644
--- a/net-dialup/martian/files/grsecurity.patch
+++ b/net-dialup/martian-modem/files/martian-modem-20100123-grsecurity.patch
diff --git a/net-dialup/martian-modem/files/martian-modem-20100123-makefile.patch b/net-dialup/martian-modem/files/martian-modem-20100123-makefile.patch
new file mode 100644
index 00000000..e6ce7ca7
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem-20100123-makefile.patch
@@ -0,0 +1,34 @@
+--- martian-full-20100123/Makefile 2008-07-02 15:42:48.000000000 -0800
++++ martian-full-20100123.new/Makefile 2012-10-08 12:14:33.284275312 -0800
+@@ -1,10 +1,10 @@
+
+-KERNEL_DIR:=/lib/modules/$(shell uname -r)/build
+-SUBLEVEL:=$(shell echo $(KERNEL_DIR) | cut -d. -f3 | cut -d. -f1 | cut -d- -f1)
+-# support begins at SUBLEVEL 20
+-after20:=$(shell if [ "$(SUBLEVEL)" -gt 20 ] ;then echo OK; fi)
++#KERNEL_DIR:=/lib/modules/$(shell uname -r)/build
++#SUBLEVEL:=$(shell echo $(KERNEL_DIR) | cut -d. -f3 | cut -d. -f1 | cut -d- -f1)
++## support begins at SUBLEVEL 20
++#after20:=$(shell if [ "$(SUBLEVEL)" -gt 20 ] ;then echo OK; fi)
+
+-ifdef after20
++#ifdef after20
+ all:
+ $(MAKE) -C kmodule/ modules
+ $(MAKE) -C modem/ all
+@@ -14,11 +14,11 @@
+ $(MAKE) -C kmodule/ install
+ $(MAKE) -C modem/ install
+
+-else
+-20less:
+- @echo "The martian_dev.ko driver and the complementary helper martian_helper are for use with kernels after 2.6.20. Use the martian-20080407.tar.gz for earlier kernels."
++#else
++#20less:
++# @echo "The martian_dev.ko driver and the complementary helper martian_helper are for use with kernels after 2.6.20. Use the martian-20080407.tar.gz for earlier kernels."
+
+-endif
++#endif
+
+ clean:
+ $(MAKE) -C kmodule/ clean
diff --git a/net-dialup/martian-modem/files/martian-modem.conf.d b/net-dialup/martian-modem/files/martian-modem.conf.d
new file mode 100644
index 00000000..47e2f62b
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem.conf.d
@@ -0,0 +1,45 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/martian-modem/files/martian-modem.conf.d,v 1.1 2012/12/15 16:41:36 pacho Exp $
+#
+### Configuration for martian-modem initscript
+#
+### DEVICE
+# Device that will martian-modem daemon create to act as modem device.
+# Default is /dev/ttySM0.
+#DEVICE="/dev/ttySM0"
+#
+#
+### USER/GROUP
+# User and group that will have access to the modem device.
+# Default values are nobody/dialout.
+# Note: the daemon itself needs to be run as root!
+#USER="nobody"
+#GROUP="dialout"
+#
+#
+### MARTIAN_OPTS
+# Other options to be passed to the daemon, see description below.
+# Defaults to empty.
+# --realtime - raise priority of threads to realtime.
+# --smp - true smp (symmetric multiprocessing) mode.
+# --country=<country> - two-letter code for the country.
+# Run `/usr/sbin/martian_modem --info countries` for list.
+# --no-cdclose - keep working with client when carrier lost.
+# --hide-pty - save pty from others as soon its open. Client
+# should notify it's here writing to device. For callback feature.
+#MARTIAN_OPTS=""
+#
+#
+### LOGGING
+# Should we log to syslog [YES/NO]
+# Default to YES. If you do not want this, say NO here to use LOGFILE instead.
+#USE_SYSLOG="YES"
+# Alternatively, you can log to a separate file. The default location is below.
+#LOGFILE="/var/log/martian-modem.log"
+#
+#
+### DEBUG
+# How verbose should the log be [1-5]
+# Default debug_level=1; debug_level=3 is suitable for normal debugging.
+#DEBUG_LEVEL=1
diff --git a/net-dialup/martian-modem/files/martian-modem.init.d b/net-dialup/martian-modem/files/martian-modem.init.d
new file mode 100644
index 00000000..3c5b8561
--- /dev/null
+++ b/net-dialup/martian-modem/files/martian-modem.init.d
@@ -0,0 +1,50 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/martian-modem/files/martian-modem.init.d,v 1.1 2012/12/15 16:41:36 pacho Exp $
+
+daemon=/usr/sbin/martian_modem
+description="Initscript to run the userspace daemon for winmodems supported by martian-modem driver"
+
+: ${device:=${DEVICE:-/dev/ttySM0}}
+: ${logfile:=${LOGFILE:-/var/log/martian-modem.log}}
+: ${user:=${USER:-nobody}}
+: ${group:=${GROUP:-dialout}}
+: ${debug_level:=${DEBUG_LEVEL:-1}}
+: ${use_syslog:=${USE_SYSLOG:-YES}}
+pidfile=/var/run/${SVCNAME}.pid
+
+depend() {
+ need localmount
+ [ "${use_syslog}" = "YES" ] && use syslog
+}
+
+start() {
+ if [ -e /proc/modules ] ; then
+ local modem=
+ for modem in /dev/modem /dev/ttySM[0-9]* ; do
+ [ -e "${modem}" ] && break
+ done
+ fi
+ if [ ! -e "${modem}" ] ; then
+ modprobe martian-dev || eerror $? "Error loading martian-dev module"
+ fi
+
+ if ! yesno "${use_syslog}" ; then
+ martian_opts="${MARTIAN_OPTS} --log=${logfile}"
+ else
+ martian_opts="${MARTIAN_OPTS} --syslog"
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec ${daemon} --user ${user}:${group} \
+ --pidfile ${pidfile} --make-pidfile --background \
+ -- ${martian_opts} --debug=${debug_level} ${device}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --pidfile ${pidfile}
+ eend $?
+}
diff --git a/net-dialup/martian-modem/martian-modem-20100123.ebuild b/net-dialup/martian-modem/martian-modem-20100123.ebuild
new file mode 100644
index 00000000..f9288b7f
--- /dev/null
+++ b/net-dialup/martian-modem/martian-modem-20100123.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+inherit linux-mod eutils
+
+MY_P="martian-full-${PV}"
+DESCRIPTION="ltmodem alternative driver providing support for Agere Systems winmodems"
+HOMEPAGE="http://packages.debian.org/sid/martian-modem-source http://phep2.technion.ac.il/linmodems/packages/ltmodem/kernel-2.6/martian"
+#SRC_URI="mirror://debian/pool/non-free/m/martian-modem/${MY_P}.tar.gz"
+#SRC_URI="http://phep2.technion.ac.il/linmodems/packages/ltmodem/kernel-2.6/martian/${MY_P}.tar.gz"
+SRC_URI="http://linmodems.technion.ac.il/packages/ltmodem/kernel-2.6/martian/${MY_P}.tar.gz"
+
+LICENSE="GPL-2 AgereSystems-WinModem"
+KEYWORDS="~amd64 ~x86 -*"
+IUSE=""
+
+DEPEND="!net-dialup/ltmodem"
+RDEPEND="${DEPEND}"
+
+# Do NOT remove this. Stripping results in broken communication
+# with core state communication channel (also see QA_* stuff below)
+RESTRICT="strip"
+
+# contains proprietary precompiled 32 bit ltmdmobj.o
+QA_PREBUILT="usr/sbin/martian_modem"
+
+S="${WORKDIR}/${P/modem/full}"
+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
+}
+
+src_prepare() {
+ # Exclude Makefile kernel version check, we used kernel_is above.
+ # TODO: More exactly, martian-modem-full-20100123 is for >kernel-2.6.20!
+ epatch "${FILESDIR}/${P}-makefile.patch"
+ epatch "${FILESDIR}/${P}-grsecurity.patch"
+
+ # fix compile on amd64
+ sed -i -e "/^HOST.*$/s:uname -i:uname -m:" modem/Makefile || die "sed failed"
+
+ BUILD_TARGETS="all"
+ BUILD_PARAMS="KERNEL_DIR='${KV_DIR}' SUBLEVEL='${KV_PATCH}'"
+}
+
+src_install() {
+ linux-mod_src_install
+
+ # userspace daemon and initscripts stuff
+ dosbin modem/martian_modem
+ newconfd "${FILESDIR}/${PN}.conf.d" ${PN}
+ newinitd "${FILESDIR}/${PN}.init.d" ${PN}
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ if linux_chkconfig_present SMP ; then
+ elog "You have SMP (symmetric multi processor) support enabled in kernel."
+ elog "You should run martian-modem with --smp enabled in MARTIAN_OPTS."
+ fi
+ if ! has_version net-dialup/martian-modem; then
+ elog "See /etc/conf.d/${PN} for configuration options."
+ elog "After you have finished the configuration, you need to run /etc/init.d/${PN} start"
+ elog
+ fi
+ if [ "$(rc-config list default | grep martian-modem)" = "" ]; then
+ elog "To run the userspace daemon automatically on every boot, just add it to a runlevel:"
+ elog "rc-update add ${PN} default"
+ elog
+ fi
+ if has_version net-dialup/wvdial; then
+ elog "If using net-dialup/wvdial, you need \"Carrier Check = no\" line."
+ fi
+}
diff --git a/net-dialup/martian-modem/metadata.xml b/net-dialup/martian-modem/metadata.xml
new file mode 100644
index 00000000..21c33b12
--- /dev/null
+++ b/net-dialup/martian-modem/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>rogerx.oss@gmail.com</email>
+ <name>Roger</name>
+ <description>Please assign bugs</description>
+</maintainer>
+<maintainer>
+ <email>pacho@gentoo.org</email>
+ <description>proxy-maintainer, please CC on bugs</description>
+</maintainer>
+</pkgmetadata>
diff --git a/net-dialup/martian/martian-20100123.ebuild b/net-dialup/martian/martian-20100123.ebuild
deleted file mode 100644
index 7ddce3a1..00000000
--- a/net-dialup/martian/martian-20100123.ebuild
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI=5
-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=""
-SLOT="0"
-
-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 lt 2 6 21
- then eerror "This driver works only with 2.6.21 or newer kernels!"
- die "unsupported kernel detected"
- fi
-
- BUILD_TARGETS="all"
- BUILD_PARAMS="KERNEL_DIR='${KV_DIR}' SUBLEVEL='21'"
-}
-
-src_prepare() {
- epatch "${FILESDIR}/grsecurity.patch"
- epatch_user
-}
-
-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."
-}
diff --git a/net-dialup/martian/metadata.xml b/net-dialup/martian/metadata.xml
deleted file mode 100644
index 73a6d343..00000000
--- a/net-dialup/martian/metadata.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer>
- <email>martin@mvath.de</email>
- <name>Martin Väth</name>
- </maintainer>
-</pkgmetadata>