diff options
author | Daniel Black <dragonheart@gentoo.org> | 2004-06-05 10:41:21 +0000 |
---|---|---|
committer | Daniel Black <dragonheart@gentoo.org> | 2004-06-05 10:41:21 +0000 |
commit | aa1c85340442041dd0074d77862a8a3c5d1b2c85 (patch) | |
tree | c69fe874c1e094996cf98968a792ae04c70a8855 /net-dialup | |
parent | Added to ~ppc (Manifest recommit) (diff) | |
download | gentoo-2-aa1c85340442041dd0074d77862a8a3c5d1b2c85.tar.gz gentoo-2-aa1c85340442041dd0074d77862a8a3c5d1b2c85.tar.bz2 gentoo-2-aa1c85340442041dd0074d77862a8a3c5d1b2c85.zip |
More fixes according to bug #47947
Diffstat (limited to 'net-dialup')
-rw-r--r-- | net-dialup/slmodem/ChangeLog | 10 | ||||
-rw-r--r-- | net-dialup/slmodem/files/digest-slmodem-2.9.7-r1 | 1 | ||||
-rw-r--r-- | net-dialup/slmodem/files/slmodem-2.9.conf | 19 | ||||
-rw-r--r-- | net-dialup/slmodem/files/slmodem-2.9.devfs | 11 | ||||
-rw-r--r-- | net-dialup/slmodem/files/slmodem-2.9.init | 9 | ||||
-rw-r--r-- | net-dialup/slmodem/files/slmodem-2.9.modules | 25 | ||||
-rw-r--r-- | net-dialup/slmodem/slmodem-2.9.7-r1.ebuild | 98 |
7 files changed, 138 insertions, 35 deletions
diff --git a/net-dialup/slmodem/ChangeLog b/net-dialup/slmodem/ChangeLog index 85ad36958a1a..59480eec789a 100644 --- a/net-dialup/slmodem/ChangeLog +++ b/net-dialup/slmodem/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-dialup/slmodem # Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/ChangeLog,v 1.7 2004/05/23 07:16:49 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/ChangeLog,v 1.8 2004/06/05 10:41:21 dragonheart Exp $ + +*slmodem-2.9.7-r1 (05 Jun 2004) + + 05 Jun 2004; Daniel Black <dragonheart@gentoo.org> files/slmodem-2.9.conf, + files/slmodem-2.9.devfs, files/slmodem-2.9.init, files/slmodem-2.9.modules, + +slmodem-2.9.7-r1.ebuild: + More fixes according to bug #47947. Thanks to Miroslaw Mieszczak, Stefan + Briesenick and Simon Cooper *slmodem-2.9.7 (23 May 2004) diff --git a/net-dialup/slmodem/files/digest-slmodem-2.9.7-r1 b/net-dialup/slmodem/files/digest-slmodem-2.9.7-r1 new file mode 100644 index 000000000000..45a1ca010886 --- /dev/null +++ b/net-dialup/slmodem/files/digest-slmodem-2.9.7-r1 @@ -0,0 +1 @@ +MD5 741aec69a9cdb95fbce21105b4f1924c slmodem-2.9.7.tar.gz 648986 diff --git a/net-dialup/slmodem/files/slmodem-2.9.conf b/net-dialup/slmodem/files/slmodem-2.9.conf index 4738d715e4c9..f03438aac742 100644 --- a/net-dialup/slmodem/files/slmodem-2.9.conf +++ b/net-dialup/slmodem/files/slmodem-2.9.conf @@ -1,13 +1,16 @@ # Config file for /etc/init.d/slmodemd MODULE=slamr -#DEV=/dev/ttySL0 -#LN_DEV=/dev/modem -#MODEM_DAEMON=/usr/sbin/slmodemd - -COUNTRY=USA +# or MODULE=slusb -# NEEDED: PTSN defaults -#COUNTRY=USA -#COUNTRY=ITALY +DEV=/dev/slamr0 +LN_DEV=/dev/modem +#MODEM_DAEMON=/usr/sbin/slmodemd +COUNTRY=THAILAND +GROUP=dialout +# this must be kept in sync with: +# /etc/devfs.d/slmodem (devfs) +# /etc/modules.d/slmodem (devfs) +# /etc/udev/rules.d/55-slmodem.rules (udev) +# /etc/udev/permissions.d/55-slmodem.permissions (udev) diff --git a/net-dialup/slmodem/files/slmodem-2.9.devfs b/net-dialup/slmodem/files/slmodem-2.9.devfs index 4e0768bd96ab..16e49322c72c 100644 --- a/net-dialup/slmodem/files/slmodem-2.9.devfs +++ b/net-dialup/slmodem/files/slmodem-2.9.devfs @@ -1,7 +1,8 @@ # slmodem kernel modules' devfs configuration file -# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/files/slmodem-2.9.devfs,v 1.1 2004/05/23 07:16:49 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/files/slmodem-2.9.devfs,v 1.2 2004/06/05 10:41:21 dragonheart Exp $ -# Create /dev/modem for /dev/ttySL0 (Change to suit your setup) -LOOKUP ^modem$ CFUNCTION GLOBAL mksymlink ttySL0 modem -REGISTER ^ttySL0$ CFUNCTION GLOBAL mksymlink $devname modem -UNREGISTER ^ttySL0$ CFUNCTION GLOBAL unlink modem +# Create /dev/modem for /dev/slamr0 (Change to suit your setup) +LOOKUP ^slamr0$ MODLOAD ACTION slamr +LOOKUP ^slamr0$ CFUNCTION GLOBAL mksymlink slamr0 modem +REGISTER ^slamr0$ CFUNCTION GLOBAL mksymlink $devname modem +UNREGISTER ^slamr0$ CFUNCTION GLOBAL unlink modem diff --git a/net-dialup/slmodem/files/slmodem-2.9.init b/net-dialup/slmodem/files/slmodem-2.9.init index d95793581780..fa1236e90cdc 100644 --- a/net-dialup/slmodem/files/slmodem-2.9.init +++ b/net-dialup/slmodem/files/slmodem-2.9.init @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/files/slmodem-2.9.init,v 1.1 2004/05/23 07:16:49 dragonheart Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/files/slmodem-2.9.init,v 1.2 2004/06/05 10:41:21 dragonheart Exp $ depend() { need logger @@ -16,17 +16,18 @@ checkconfig() { } start() { - ebegin "Starting slmodemd" + ebegin "Starting slmodemd for ${DEV}" modprobe ${MODULE} - start-stop-daemon --start --quiet --background --make-pidfile \ + start-stop-daemon --start --background --make-pidfile \ --pidfile /var/run/slmodemd.pid --startas /usr/sbin/slmodemd \ - -- --country=${COUNTRY} /dev/${MODEM}0 + -- -country=${COUNTRY} -g=${GROUP} ${DEV} eend $? } stop() { ebegin "Shutting down slmodemd" start-stop-daemon --stop --quiet --pidfile /var/run/slmodemd.pid && rm /var/run/slmodemd.pid + modprobe -r ${MODULE} eend $? } diff --git a/net-dialup/slmodem/files/slmodem-2.9.modules b/net-dialup/slmodem/files/slmodem-2.9.modules index be4b5875b8d3..be8f6e6f6f20 100644 --- a/net-dialup/slmodem/files/slmodem-2.9.modules +++ b/net-dialup/slmodem/files/slmodem-2.9.modules @@ -1,22 +1,13 @@ -# slmodem 2.7.x kernel modules' configuration file -# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/files/slmodem-2.9.modules,v 1.1 2004/05/23 07:16:49 dragonheart Exp $ - -## IMPORTANT: -## You need to customise this for your modem -## and then run the `modules-update' command. - -## Uncomment one of the two MODEM options. -define MODEM `grep MODEM= /etc/conf.d/slmodem | sed 's/MODEM=//'` +# slmodem 2.9.x kernel modules' configuration file +# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/files/slmodem-2.9.modules,v 1.2 2004/06/05 10:41:21 dragonheart Exp $ ## Uncomment this and select your country. -define COUNTRY `grep country= /etc/conf.d/slmodem | sed 's/COUNTRY=//'` +#define COUNTRY `grep COUNTRY= /etc/conf.d/slmodem | sed 's/COUNTRY=//'` ## You do not need to change anything below here. -options slmdm country=${COUNTRY} -alias char-major-212 slmdm -alias char-major-213 slusb +# country nolonger a option +#options slamr country=${COUNTRY} +#options slusb country=${COUNTRY} -alias /dev/modem ${MODEM} -alias slmdm off -pre-install ${MODEM} modprobe slmdm -probeall /dev/ttySL* slmdm ${MODEM} +alias char-major-212 slamr +alias char-major-213 slusb diff --git a/net-dialup/slmodem/slmodem-2.9.7-r1.ebuild b/net-dialup/slmodem/slmodem-2.9.7-r1.ebuild new file mode 100644 index 000000000000..28c62c801d11 --- /dev/null +++ b/net-dialup/slmodem/slmodem-2.9.7-r1.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.7-r1.ebuild,v 1.1 2004/06/05 10:41:21 dragonheart Exp $ + +inherit eutils + +DESCRIPTION="Driver for Smart Link modem" +HOMEPAGE="http://www.smlink.com/" +MY_P="${P}" +SRC_URI="ftp://ftp.smlink.com/linux/unsupported/${MY_P}.tar.gz" +LICENSE="Smart-Link" +SLOT="0" +KEYWORDS="~x86" +IUSE="alsa" +RDEPEND="virtual/glibc" +S="${WORKDIR}/${MY_P}" + +src_unpack() { + unpack ${A} + epatch ${FILESDIR}/${P}-makefile-fixup.patch +} + +src_compile() { + if has sandbox ${FEATURES} || has userpriv ${FEATURES} || has usersandbox ${FEATURES}; then + ewarn "Users emerging this with a 2.6 kernel still need to disable" + ewarn "sandbox, usersandbox, userpriv from FEATURES." + einfo 'use: env FEATURES="-userpriv -usersandbox -sandbox" emerge slmodem' + die "bad FEATURES - sandbox, usersandbox and/or userpriv " + fi + unset ARCH + if use alsa ; then + emake SUPPORT_ALSA=1 MODVERDIR=${T}/.tmp_versions || die 'Alsa support failed, try USE="-alsa"' + else + emake || die "Could not compile" + fi +} + +src_install() { + unset ARCH + emake DESTDIR=${D} install || die + + dodoc COPYING Changes README README.1st + + # Install /etc/{devfs,modules,init,conf}.d/slmodem files + insinto /etc/conf.d/; newins ${FILESDIR}/${PN}-2.9.conf ${PN} + insopts -m0755; insinto /etc/init.d/; newins ${FILESDIR}/${PN}-2.9.init ${PN} + + # Make some devices if we aren't using devfs + # If we are using devfs, restart it + if [ -e ${ROOT}/dev/.devfsd ] ; then + # devfs + insinto /etc/devfs.d/; newins ${FILESDIR}/${PN}-2.9.devfs ${PN} + insinto /etc/modules.d/; newins ${FILESDIR}/${PN}-2.9.modules ${PN} + elif [ -e ${ROOT}/dev/.udev ] ; then + # udev + echo 'KERNEL="slamr", NAME="slamr0", SYMLINK="modem"' > \ + ${D}/etc/udev/rules.d/55-${PN}.rules + echo 'slamr*:root:dialout:0660' > \ + ${D}/etc/udev/permissions.d/55-${PN}.permissions + else + # simple raw devs + dodir /dev + ebegin "Creating /dev/slamr* devices" + local C="0" + while [ "${C}" -lt "4" ] + do + if [ ! -c ${ROOT}/dev/slamr${C} ] + then + mknod ${D}/dev/slamr${C} c 212 0 + fi + C="`expr $C + 1`" + done + eend 0 + fi + +} + +pkg_postinst() { + # Make some devices if we aren't using devfs + # If we are using devfs, restart it + if [ -e ${ROOT}/dev/.devfsd ] + then + + ebegin "Restarting devfsd to create /dev/modem symlink" + killall -HUP devfsd + eend 0 + einfo "modules-update to complete configuration." + + elif [ -e ${ROOT}/dev/.udev ] + then + ebegin "Restarting udevd to create /dev/modem symlink" + killall -HUP udevd &>/dev/null + eend 0 + fi + + echo + einfo "You must edit /etc/conf.d/${PN} for your configuration" +} |