diff options
author | Pacho Ramos <pacho@gentoo.org> | 2012-12-15 16:41:40 +0000 |
---|---|---|
committer | Pacho Ramos <pacho@gentoo.org> | 2012-12-15 16:41:40 +0000 |
commit | b82c0fc03e4ab0c851487c9a07b8fb8a6e4c7137 (patch) | |
tree | 2484bbef3b3ab36a23d227a3a0e0818a0ab4c112 /net-dialup | |
parent | Add alternative for net-dialup/ltmodem maintained by Roger (#285016) (diff) | |
download | historical-b82c0fc03e4ab0c851487c9a07b8fb8a6e4c7137.tar.gz historical-b82c0fc03e4ab0c851487c9a07b8fb8a6e4c7137.tar.bz2 historical-b82c0fc03e4ab0c851487c9a07b8fb8a6e4c7137.zip |
Add alternative for net-dialup/ltmodem maintained by Roger (#285016)
Package-Manager: portage-2.1.11.37/cvs/Linux x86_64
Manifest-Sign-Key: 0xA188FBD4
Diffstat (limited to 'net-dialup')
-rw-r--r-- | net-dialup/martian-modem/Manifest | 17 | ||||
-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 |
6 files changed, 240 insertions, 3 deletions
diff --git a/net-dialup/martian-modem/Manifest b/net-dialup/martian-modem/Manifest index f1e6c501552f..7cba955c8896 100644 --- a/net-dialup/martian-modem/Manifest +++ b/net-dialup/martian-modem/Manifest @@ -1,6 +1,17 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + 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 +AUX martian-modem.conf.d 1569 SHA256 893800445a34cbc7084e289f0add9d043f9e03fdff96e5605f3f3dd2293b83c5 SHA512 9b9b9dfeb3575a65dc56df3ed0880929ceea2a563bbf4575fd980755a49fa62e20e176508f6c43274e696862454bf5a07bf09f7f454e3dfd34de963eea30f572 WHIRLPOOL 0606274fdab00d5fc34965976e3c9e56e90ac3ace97f1cc729ff3506dddf3d3d41b77d14cd96f68361edee314970fc6933c29bb5c04c097679703da9156527c3 +AUX martian-modem.init.d 1489 SHA256 0fa608ab4453fef5baa93b552de776028c85a1fcec696ad0626f9a766fa40a03 SHA512 92c90c17222f13cda947257d09d0a3e4b4345a74461a5e31ce1c9098c043bc672a30e3436db75d494be49b184ad61aa3d42d34ace6dfa2735ac6396fac949169 WHIRLPOOL cde4be4d383f10063be7bd653d27f3c06f5634bedf38f31be791f7809b5ca6bc01787432660fe3dce03d1c776163eec22c6e530a0a485c869bc5c22f0e2d07b4 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 +EBUILD martian-modem-20100123.ebuild 2888 SHA256 040e7d3c82fa3c90432248ee9f25ea1ee76da465e6c9e60b6c7ee7e301f675c8 SHA512 47d02d7d72a52f5075515f66c18147726194abfe598e794f9178b67e8c279034ff341cec5605cb5b7fb256a87a6e2d84d2593474e93c36a420526bbfb0ed695a WHIRLPOOL 11c087e81a2cdb4ce6ecfaae4f85218a29fce8e782aa09197e7b9c5e694100763fae177e53d20b36d56f5665d70084289a1a60648028b2e18a1449b57f32c55c +MISC ChangeLog 531 SHA256 836a5a15974d26c7582459b89ee3e592f3bc63cbe84908b1bce7f109d46ee55f SHA512 26d00fe53a371bb6b3cb65262d8aea17fb039efd93c7a66409ab20e35b5c1bdc60293ddf34a43679a7d5223ee1a9410955a40cd6dbc7d6aa3ed7e29ca10f51b9 WHIRLPOOL 134d0b70082221dfecead25f19adf87dfb252bd1be62ed6dbc9f0fb869077350ecf2a902b0d3f7cb6a058a5773046316c49314b60605840d88fbf63015ef7d82 MISC metadata.xml 394 SHA256 b03da4c079b9466f7aecc8a100f9dd519f5785ec17ab9a067e4f7c0d1bbef40e SHA512 f5f79f1ffd768adebbc580dac31d1beb966566360639c68d4ad3493657daf360439e97fe4533e5f7bec5faf5433284640c82efa8b26efb8fe00483a5db145c94 WHIRLPOOL ca27c1436db28cf7480fb6ca6c26f26bfb86235de99bc50af14e830b90dc7a207c16a9e00e20a55db6acff094d5875a94101a07c35d0eb3a1d6b39749b1d7bcc +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.19 (GNU/Linux) + +iEYEAREIAAYFAlDMqEEACgkQCaWpQKGI+9SLqwCdG8jvMWev7g/03PGwiUrwHpsP +R6kAnRVgx3lbIQILVZDZ78F5Ml43420s +=89zj +-----END PGP SIGNATURE----- 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> |