summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <dragonheart@gentoo.org>2004-07-25 00:04:48 +0000
committerDaniel Black <dragonheart@gentoo.org>2004-07-25 00:04:48 +0000
commit2756298badbb9546434a7ce3d850817ae34643bf (patch)
tree9f3a5c34efdeb0e6c33dac0ed30fadaa23256bf3 /net-dialup/slmodem
parentimproving initscript (Manifest recommit) (diff)
downloadgentoo-2-2756298badbb9546434a7ce3d850817ae34643bf.tar.gz
gentoo-2-2756298badbb9546434a7ce3d850817ae34643bf.tar.bz2
gentoo-2-2756298badbb9546434a7ce3d850817ae34643bf.zip
Fixes as per bug #58222 (missing README.1ST and bug #47947 (virtual/os-headers dependancy, init.d script improvements)
Diffstat (limited to 'net-dialup/slmodem')
-rw-r--r--net-dialup/slmodem/ChangeLog8
-rw-r--r--net-dialup/slmodem/files/slmodem-2.9.conf11
-rw-r--r--net-dialup/slmodem/files/slmodem-2.9.init6
-rw-r--r--net-dialup/slmodem/slmodem-2.9.9.ebuild68
4 files changed, 51 insertions, 42 deletions
diff --git a/net-dialup/slmodem/ChangeLog b/net-dialup/slmodem/ChangeLog
index 70d4b0ce5905..561dc8ca1ac3 100644
--- a/net-dialup/slmodem/ChangeLog
+++ b/net-dialup/slmodem/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-dialup/slmodem
# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/ChangeLog,v 1.15 2004/07/24 16:31:51 dragonheart Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/ChangeLog,v 1.16 2004/07/25 00:04:48 dragonheart Exp $
+
+ 25 Jul 2004; Daniel Black <dragonheart@gentoo.org> files/slmodem-2.9.conf,
+ files/slmodem-2.9.init, slmodem-2.9.9.ebuild:
+ Fixes as per bug #58222 (missing README.1ST and bug #47947 (virtual/os-headers
+ dependancy). Improved init.d script too. Thanks to Matteo Settenvini and Simon
+ Cooper <thecoop@runbox.com>.
*slmodem-2.9.9 (25 Jul 2004)
diff --git a/net-dialup/slmodem/files/slmodem-2.9.conf b/net-dialup/slmodem/files/slmodem-2.9.conf
index 659e8748cbd9..0fb40baca7a8 100644
--- a/net-dialup/slmodem/files/slmodem-2.9.conf
+++ b/net-dialup/slmodem/files/slmodem-2.9.conf
@@ -1,13 +1,22 @@
# Config file for /etc/init.d/slmodemd
+# The following sets the ALSA init script to
+# be a dependancy of the slmodem one. It does not
+# provide ALSA support.
+ALSA=no
+
MODULE=slamr
# or MODULE=slusb
# Raise priority to reduce modem dropouts
NICE=-6
+# for ALSA users, use the following:
+# DEV=/dev/ttySL0
+# else:
+# DEV=/dev/slamr0
+# DEV=/dev/slusb0
-DEV=/dev/slamr0
LN_DEV=/dev/modem
#MODEM_DAEMON=/usr/sbin/slmodemd
COUNTRY=THAILAND
diff --git a/net-dialup/slmodem/files/slmodem-2.9.init b/net-dialup/slmodem/files/slmodem-2.9.init
index 97f3283a6a37..ef7604f38a91 100644
--- a/net-dialup/slmodem/files/slmodem-2.9.init
+++ b/net-dialup/slmodem/files/slmodem-2.9.init
@@ -1,10 +1,14 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# 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.5 2004/07/14 23:10:35 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/files/slmodem-2.9.init,v 1.6 2004/07/25 00:04:48 dragonheart Exp $
depend() {
need logger
+ if [ "${ALSA}" = "yes" ]
+ then
+ need alsa-sound
+ fi
}
diff --git a/net-dialup/slmodem/slmodem-2.9.9.ebuild b/net-dialup/slmodem/slmodem-2.9.9.ebuild
index 822cd956e314..67835d41e35f 100644
--- a/net-dialup/slmodem/slmodem-2.9.9.ebuild
+++ b/net-dialup/slmodem/slmodem-2.9.9.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.9.ebuild,v 1.1 2004/07/24 16:31:51 dragonheart Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/slmodem-2.9.9.ebuild,v 1.2 2004/07/25 00:04:48 dragonheart Exp $
inherit kmod eutils
@@ -10,20 +10,15 @@ SRC_URI="http://www.smlink.com/main/down/${P}.tar.gz"
LICENSE="Smart-Link"
SLOT="${KV}"
KEYWORDS="~x86"
-IUSE="alsa"
+IUSE="alsa usb"
DEPEND="virtual/libc
alsa? ( media-libs/alsa-lib )
- sys-kernel/linux-headers"
-
-# sys-kernel/config-kernel
+ virtual/os-headers"
RDEPEND="virtual/libc
alsa? ( media-libs/alsa-lib )"
-#KMOD_SOURCES="${P}.tar.gz"
-#KMOD_KOUTPUT_PATCH=""
-
src_unpack() {
# Unpack and set some variables
kmod_src_unpack
@@ -51,8 +46,6 @@ src_compile() {
fi
mkdir ${S}/workdir
- #cd ${S}/workdir
- #cp ${KV_OUTPUT}/.config .
emake -C ${S} \
KERNEL_VER=${KV_VERSION_FULL} \
@@ -66,6 +59,13 @@ src_compile() {
# cd modem
# emake modem_test
# ./modem_test || die "failed modem test"
+#
+# if use usb
+# then
+# # USB modem test
+# else
+# # PCI modem test
+# fi
#}
src_install() {
@@ -79,12 +79,26 @@ src_install() {
dodir /var/lib/slmodem
fowners root:dialout /var/lib/slmodem
- dodoc COPYING Changes README README.1st
+ dodoc COPYING Changes README
# 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}
+ if use alsa
+ then
+ sed -i -e "s/ALSA=.*/ALSA=yes/" -e "s:# DEV=/dev/ttySL0:DEV=/dev/ttySL0:" ${D}//etc/conf.d/slmodem
+ else
+ sed -i -e "s/ALSA=.*/ALSA=yes/" ${D}//etc/conf.d/slmodem
+ if use usb
+ then
+ sed -i -e "s:# DEV=/dev/slusb0:DEV=/dev/slusb0:" ${D}//etc/conf.d/slmodem
+ else
+ sed -i -e "s:# DEV=/dev/slamr0:DEV=/dev/slamr0:" ${D}//etc/conf.d/slmodem
+ fi
+ fi
+
+
# Make some devices if we aren't using devfs
# If we are using devfs, restart it
if [ -e ${ROOT}/dev/.devfsd ] ; then
@@ -104,34 +118,6 @@ src_install() {
make -C drivers DESTDIR=${D} KERNELRELEASE=1 KERNEL_VER=${KV_VERSION_FULL} install-devices
fi
- #if 1
- #then
- # 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 ${C}
- # # doco suggests that the slmodemd creates these
- # # ln -s slamr${C} ttySL${C}
- # fi
- # if [ ! -c ${ROOT}/dev/slamr${C} ]
- # then
- # mknod ${D}/dev/slusb${C} c 213 ${C}
- # #TODO usb or slamr (AMR/CNR/PCI) version for symlinks???
- # # ln -s sl${C} ttySL${C}
- # fi
-
- # C="`expr $C + 1`"
- # done
- # eend 0
- # cd ${D}/dev
- # ln -s ttySL0 modem
- #fi
-
}
pkg_postinst() {
@@ -159,8 +145,12 @@ pkg_postinst() {
einfo "You must edit /etc/conf.d/${PN} for your configuration"
+ einfo "To add slmodem to your startup - type : rc-update add slmodem default"
+
if use alsa;
then
+ einfo "I hope you have already added alsa to your startup: "
+ einfo "otherwise type: rc-update add alsa-sound boot"
einfo
einfo "If you need to use snd-intel8x0m from the kernel"
einfo "compile it as a module and edit /etc/module.d/alsa"