diff options
author | Pacho Ramos <pacho@gentoo.org> | 2012-12-15 16:41:36 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2012-12-15 16:41:36 +0000 |
commit | 6082b1bf7d946ab54a43bfc9f8497f0af40c31da (patch) | |
tree | 5eef910fe008ddb946f82368a14b20e8ab9d5251 /net-dialup | |
parent | error out on unsupported gcc version wrt #441564 (diff) | |
download | gentoo-2-6082b1bf7d946ab54a43bfc9f8497f0af40c31da.tar.gz gentoo-2-6082b1bf7d946ab54a43bfc9f8497f0af40c31da.tar.bz2 gentoo-2-6082b1bf7d946ab54a43bfc9f8497f0af40c31da.zip |
Add alternative for net-dialup/ltmodem maintained by Roger (#285016)
(Portage version: 2.1.11.37/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'net-dialup')
-rw-r--r-- | net-dialup/martian-modem/ChangeLog | 10 | ||||
-rw-r--r-- | net-dialup/martian-modem/Manifest | 6 | ||||
-rw-r--r-- | net-dialup/martian-modem/files/martian-modem-20100123-makefile.patch | 34 | ||||
-rw-r--r-- | net-dialup/martian-modem/files/martian-modem.conf.d | 45 | ||||
-rw-r--r-- | net-dialup/martian-modem/files/martian-modem.init.d | 50 | ||||
-rw-r--r-- | net-dialup/martian-modem/martian-modem-20100123.ebuild | 84 | ||||
-rw-r--r-- | net-dialup/martian-modem/metadata.xml | 13 |
7 files changed, 242 insertions, 0 deletions
diff --git a/net-dialup/martian-modem/ChangeLog b/net-dialup/martian-modem/ChangeLog new file mode 100644 index 000000000000..e922ecdc6bd5 --- /dev/null +++ b/net-dialup/martian-modem/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for net-dialup/martian-modem +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/martian-modem/ChangeLog,v 1.1 2012/12/15 16:41:36 pacho Exp $ + +*martian-modem-20100123 (15 Dec 2012) + + 15 Dec 2012; Pacho Ramos <pacho@gentoo.org> + +files/martian-modem-20100123-makefile.patch, +files/martian-modem.conf.d, + +files/martian-modem.init.d, +martian-modem-20100123.ebuild, +metadata.xml: + Add alternative for net-dialup/ltmodem maintained by Roger (#285016) diff --git a/net-dialup/martian-modem/Manifest b/net-dialup/martian-modem/Manifest new file mode 100644 index 000000000000..f1e6c501552f --- /dev/null +++ b/net-dialup/martian-modem/Manifest @@ -0,0 +1,6 @@ +AUX martian-modem-20100123-makefile.patch 1237 SHA256 e72d414c57a7fbb50b14536bfc104d0696196cfcb691af9cad6f9f9410293489 SHA512 96c0f5a507b514146b4193c8299f3da8c7ec68db62d8d7e0e38626f849b846cc098cccb172ccc986d351918a1d6262c1351d66de3e6d283341c069de2f2b39a2 WHIRLPOOL 127ee7c4c8c5aaaabef8da5b50c8f39ce8ad8f4106066fae3bc29d914c422aee30d82ec0405ecb54def5c20af4d6a8b8c8452f93a904b4cab9ee28a07cc89370 +AUX martian-modem.conf.d 1457 SHA256 c2cee3b7993fb75005709e21ccbb9d429497fd2d9c5ed78bf73b1218a4dc5e86 SHA512 3096df1b4016071788706675a49b30a56f5df64665e371ff3f9deb4f9a1c60b05acbdc3723830dab7d347ac5d4ff7d8cfb03423524ce102c45b4b242ab402301 WHIRLPOOL 241b0e7ca8eda56ed211ecedc8833bccf4d3d5a2b4f0ccc74e45fb5eed8260874691979c577722696880009d04017b0e4b5cfbafcec90a9c0e985ec1058d57a3 +AUX martian-modem.init.d 1377 SHA256 3aaee7100b44475d0ba40fc44626677061e5574dbb1dea52614442b79960787b SHA512 2fef9b1c459bcf28a5d78562e235b13280c7b63a861f7543ac6a7e5cc6beb83c8b7c0bc728ce53a611667c97d8ef2d03eaedf93122e1b4e864a3bb732780a271 WHIRLPOOL 338c571f2177cb7d8a08143443280e0f4fc0beb2b7b866bdb7adfa6d996d6fe19efdf138e307616cfb8bd379190c9cbe5ee3f51e3c26d736b1aa7fea9a56350e +DIST martian-full-20100123.tar.gz 275365 SHA256 bf3ad369dc90e3ef7952e6bb7873b3121ce79a855060a1b4b4e3a1d8e7d08ac3 SHA512 bcd51103792bd1d477ab81f8bbb591f3eb5341920e6b0b35e8ba066a50b8a6ddf076c0bc0d21cf686c8137f8164221635b3c296185283f6e20ce2d04709f69ec WHIRLPOOL b38fb4ea1e7282cf51547c4d6ab3423350dabe717ebe89efa20cc92148347d7e1b2fcc32085d3edc677768f7286715087034bace7f51415ce31a24d840c85c59 +EBUILD martian-modem-20100123.ebuild 2773 SHA256 54502fe6854c406f80661e5b045d63d5a4b65d686d26a5ff6053a835957d0b85 SHA512 e1402159788ed24a4062c5088b01946776278a2b4ca2b7b0c6a1b4d529f05a28bd33dd6a3615922dc26822af6241e3ebd94ea4c305a36bc9d5ffb4982b7a8a4b WHIRLPOOL a79d5169b884ce5ff252a9135027ab65b3e35ae2e7602bdb12ad80b8e71d96fccc7de54780861a4a229dcb09328bab6573355afb678c5c4dbc90fe5b7fd6c41d +MISC metadata.xml 394 SHA256 b03da4c079b9466f7aecc8a100f9dd519f5785ec17ab9a067e4f7c0d1bbef40e SHA512 f5f79f1ffd768adebbc580dac31d1beb966566360639c68d4ad3493657daf360439e97fe4533e5f7bec5faf5433284640c82efa8b26efb8fe00483a5db145c94 WHIRLPOOL ca27c1436db28cf7480fb6ca6c26f26bfb86235de99bc50af14e830b90dc7a207c16a9e00e20a55db6acff094d5875a94101a07c35d0eb3a1d6b39749b1d7bcc 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 000000000000..e6ce7ca7e52e --- /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 000000000000..47e2f62b6eb3 --- /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 000000000000..3c5b8561cfe8 --- /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 000000000000..e3a31bea4771 --- /dev/null +++ b/net-dialup/martian-modem/martian-modem-20100123.ebuild @@ -0,0 +1,84 @@ +# 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/martian-modem-20100123.ebuild,v 1.1 2012/12/15 16:41:36 pacho Exp $ + +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" + + # 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 000000000000..21c33b123ec7 --- /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> |