summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <dragonheart@gentoo.org>2004-08-02 02:51:09 +0000
committerDaniel Black <dragonheart@gentoo.org>2004-08-02 02:51:09 +0000
commit03de017bf6ba5e873077fb0e8dc0a1d6dbc812a8 (patch)
tree7b83b8fd0cb2989ed7a8c4f7977c82fda1048ab2 /net-dialup
parentstable on ppc64, bug #57583 (Manifest recommit) (diff)
downloadgentoo-2-03de017bf6ba5e873077fb0e8dc0a1d6dbc812a8.tar.gz
gentoo-2-03de017bf6ba5e873077fb0e8dc0a1d6dbc812a8.tar.bz2
gentoo-2-03de017bf6ba5e873077fb0e8dc0a1d6dbc812a8.zip
fixed initscript installation. Added slmodem_test to the install. Removed older buggy versions. Closes bug #58222
Diffstat (limited to 'net-dialup')
-rw-r--r--net-dialup/slmodem/ChangeLog12
-rw-r--r--net-dialup/slmodem/Manifest22
-rw-r--r--net-dialup/slmodem/files/digest-slmodem-2.9.71
-rw-r--r--net-dialup/slmodem/files/digest-slmodem-2.9.7-r11
-rw-r--r--net-dialup/slmodem/files/digest-slmodem-2.9.7-r21
-rw-r--r--net-dialup/slmodem/files/digest-slmodem-2.9.9-r11
-rw-r--r--net-dialup/slmodem/files/slmodem-2.9.7-makefile-fixup.patch105
-rw-r--r--net-dialup/slmodem/files/slmodem-2.9.conf41
-rw-r--r--net-dialup/slmodem/files/slmodem-2.9.init84
-rw-r--r--net-dialup/slmodem/slmodem-2.9.7-r1.ebuild101
-rw-r--r--net-dialup/slmodem/slmodem-2.9.7-r2.ebuild127
-rw-r--r--net-dialup/slmodem/slmodem-2.9.7.ebuild83
-rw-r--r--net-dialup/slmodem/slmodem-2.9.9-r1.ebuild162
13 files changed, 273 insertions, 468 deletions
diff --git a/net-dialup/slmodem/ChangeLog b/net-dialup/slmodem/ChangeLog
index 5a53000cf6fe..58ce6eb23be3 100644
--- a/net-dialup/slmodem/ChangeLog
+++ b/net-dialup/slmodem/ChangeLog
@@ -1,6 +1,16 @@
# 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.17 2004/08/01 09:40:12 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/ChangeLog,v 1.18 2004/08/02 02:51:09 dragonheart Exp $
+
+*slmodem-2.9.9-r1 (02 Aug 2004)
+
+ 02 Aug 2004; Daniel Black <dragonheart@gentoo.org>
+ -files/slmodem-2.9.7-makefile-fixup.patch, files/slmodem-2.9.conf,
+ files/slmodem-2.9.init, -slmodem-2.9.7-r1.ebuild, -slmodem-2.9.7-r2.ebuild,
+ -slmodem-2.9.7.ebuild, +slmodem-2.9.9-r1.ebuild:
+ fixed initscript installation. Added slmodem_test to the install. Removed
+ older buggy versions. Closes bug #58222. Thanks to Stefan Schweizer
+ <sschweizer@gmail.com> for the init scripts
01 Aug 2004; Donnie Berkholz <spyderous@gentoo.org>; files/slmodem-2.9.init,
slmodem-2.9.9.ebuild:
diff --git a/net-dialup/slmodem/Manifest b/net-dialup/slmodem/Manifest
index 8fd5a2a5f246..a10945a6d556 100644
--- a/net-dialup/slmodem/Manifest
+++ b/net-dialup/slmodem/Manifest
@@ -1,21 +1,15 @@
-MD5 39a6e7fcda2ee23817e894ed009e7ba7 slmodem-2.7.14.ebuild 1511
-MD5 8114f79f8735648770d8f37c32861c88 metadata.xml 252
MD5 cf8fa297fc10313b967f5be8f0c704d0 ChangeLog 3640
-MD5 372056f392f4fb7e5403ab11e34f08c9 slmodem-2.9.7-r1.ebuild 2766
-MD5 6fa12f24d063c8e27767d74d89b0045e slmodem-2.9.7-r2.ebuild 3361
-MD5 aa56ae238239ffc06f6127c7ea73c731 slmodem-2.9.7.ebuild 2106
-MD5 8b5f426b0aac645b7390b130f36cb13d slmodem-2.9.9.ebuild 3720
+MD5 8114f79f8735648770d8f37c32861c88 metadata.xml 252
+MD5 39a6e7fcda2ee23817e894ed009e7ba7 slmodem-2.7.14.ebuild 1511
+MD5 6998122a5b4f965c0e89c6d7a3e92ec4 slmodem-2.9.9-r1.ebuild 3787
+MD5 39228b228b280ebc05c9c759374535ca files/slmodem-2.9.conf 806
MD5 04150d1eddd9774a7d1a70df93600e3c files/digest-slmodem-2.7.14 64
+MD5 5565553c8ddd949c38070e59ce64b90c files/slmodem-2.7.14-makefile-fixup.patch 1626
MD5 24079d6e20ac945048a1c212f06772ce files/slmodem-2.7.devfs 431
MD5 117ea746ee99218e673afc397038120d files/slmodem-2.7.modules 669
-MD5 5565553c8ddd949c38070e59ce64b90c files/slmodem-2.7.14-makefile-fixup.patch 1626
-MD5 0391d6463fed235e6038d9048a7e5251 files/digest-slmodem-2.9.7 65
-MD5 0391d6463fed235e6038d9048a7e5251 files/digest-slmodem-2.9.7-r1 65
-MD5 0391d6463fed235e6038d9048a7e5251 files/digest-slmodem-2.9.7-r2 65
-MD5 31efdce45dc6665bfc2c6cb50048d714 files/slmodem-2.9.7-makefile-fixup.patch 3476
-MD5 3627a32bd33e067000cc4975873b79ea files/slmodem-2.9.conf 632
-MD5 c80ecf5c3d5605220e4b0055850260a5 files/slmodem-2.9.devfs 786
-MD5 e247b59b405c3396a156ff6ecb44d110 files/slmodem-2.9.init 1338
MD5 8834a62c67909059cef10887bfbcc853 files/slmodem-2.9.modules 494
+MD5 9ae4e594075f43c76a7067fa8004095a files/digest-slmodem-2.9.9-r1 65
+MD5 c80ecf5c3d5605220e4b0055850260a5 files/slmodem-2.9.devfs 786
+MD5 fbb1a8dc2277bee9f82ca3329825894e files/slmodem-2.9.init 2328
MD5 9ae4e594075f43c76a7067fa8004095a files/digest-slmodem-2.9.9 65
MD5 25bc07758bde2e7a6aeb796e840d4ff2 files/slmodem-2.9.9-makefile-fixup.patch 6327
diff --git a/net-dialup/slmodem/files/digest-slmodem-2.9.7 b/net-dialup/slmodem/files/digest-slmodem-2.9.7
deleted file mode 100644
index 45a1ca010886..000000000000
--- a/net-dialup/slmodem/files/digest-slmodem-2.9.7
+++ /dev/null
@@ -1 +0,0 @@
-MD5 741aec69a9cdb95fbce21105b4f1924c slmodem-2.9.7.tar.gz 648986
diff --git a/net-dialup/slmodem/files/digest-slmodem-2.9.7-r1 b/net-dialup/slmodem/files/digest-slmodem-2.9.7-r1
deleted file mode 100644
index 45a1ca010886..000000000000
--- a/net-dialup/slmodem/files/digest-slmodem-2.9.7-r1
+++ /dev/null
@@ -1 +0,0 @@
-MD5 741aec69a9cdb95fbce21105b4f1924c slmodem-2.9.7.tar.gz 648986
diff --git a/net-dialup/slmodem/files/digest-slmodem-2.9.7-r2 b/net-dialup/slmodem/files/digest-slmodem-2.9.7-r2
deleted file mode 100644
index 45a1ca010886..000000000000
--- a/net-dialup/slmodem/files/digest-slmodem-2.9.7-r2
+++ /dev/null
@@ -1 +0,0 @@
-MD5 741aec69a9cdb95fbce21105b4f1924c slmodem-2.9.7.tar.gz 648986
diff --git a/net-dialup/slmodem/files/digest-slmodem-2.9.9-r1 b/net-dialup/slmodem/files/digest-slmodem-2.9.9-r1
new file mode 100644
index 000000000000..099d04f8b31f
--- /dev/null
+++ b/net-dialup/slmodem/files/digest-slmodem-2.9.9-r1
@@ -0,0 +1 @@
+MD5 b9eb4b43d8428024d9bb2fa3db4d56ea slmodem-2.9.9.tar.gz 708051
diff --git a/net-dialup/slmodem/files/slmodem-2.9.7-makefile-fixup.patch b/net-dialup/slmodem/files/slmodem-2.9.7-makefile-fixup.patch
deleted file mode 100644
index 096f2d00995f..000000000000
--- a/net-dialup/slmodem/files/slmodem-2.9.7-makefile-fixup.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-diff -urN slmodem-2.9.7.old/Makefile slmodem-2.9.7/Makefile
---- slmodem-2.9.7.old/Makefile 2004-02-02 08:43:43.000000000 -0800
-+++ slmodem-2.9.7/Makefile 2004-04-21 00:51:55.562017735 -0700
-@@ -14,6 +14,7 @@
- ###########################################################################
-
- KERNEL_DIR:=/lib/modules/$(shell uname -r)/build
-+DESTDIR = ${D}
-
- # tools
- INSTALL:=install
-@@ -25,6 +26,7 @@
-
- install: all install-drivers
- $(INSTALL) -D -m 755 modem/slmodemd ${DESTDIR}/usr/sbin/slmodemd
-+ $(INSTALL) -D -m 755 modem/modem_test ${DESTDIR}/usr/sbin/modem_test
- $(RM) -rf ${DESTDIR}/var/lib/slmodem
- $(INSTALL) -d -D -m 755 ${DESTDIR}/var/lib/slmodem
-
-diff -urN slmodem-2.9.7.old/drivers/Makefile slmodem-2.9.7/drivers/Makefile
---- slmodem-2.9.7.old/drivers/Makefile 2003-12-21 13:15:54.000000000 -0800
-+++ slmodem-2.9.7/drivers/Makefile 2004-04-21 01:00:30.789187581 -0700
-@@ -15,6 +15,7 @@
-
- #KBUILD_VERBOSE=1
- #export KBUILD_VERBOSE
-+DESTDIR = ${D}
-
- KERNEL_DIR:=/lib/modules/$(shell uname -r)/build
-
-@@ -28,18 +29,18 @@
- ifndef KERNELRELEASE
- ifndef KERNEL_VER
-
--all install uninstall: kernel-ver
-- $(MAKE) $@ KERNEL_VER=$(shell ./kernel-ver)
-+all install uninstall:
-+ $(MAKE) $@ KERNEL_VER=$(shell uname -r)
-
--install: install-devices
--uninstall: remove-devices
-+#install: install-devices
-+#uninstall: remove-devices
-
--kernel-ver::
-- $(CC) -I$(KERNEL_DIR)/include -o $@ $@.c
-+#kernel-ver::
-+# $(CC) -I$(KERNEL_DIR)/include -o $@ $@.c
-
- dep:
- clean:
-- $(RM) kernel-ver $(obj-m) $(obj-m:.o=.ko) *st7554.o amrmo_init.o sysdep_amr.o *.mod.* .*.cmd *~
-+ $(RM) $(obj-m) $(obj-m:.o=.ko) *st7554.o amrmo_init.o sysdep_amr.o *.mod.* .*.cmd *~
-
- install-devices:
- mkdir -p ${DESTDIR}/dev
-@@ -60,7 +61,7 @@
- obj:=.
- module-dir:=${DESTDIR}/lib/modules/$(KERNEL_VER)/misc
-
--CFLAGS:= -Wall -pipe -O3 -fomit-frame-pointer -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -DMODVERSIONS --include $(KERNEL_DIR)/include/linux/modversions.h -I$(KERNEL_DIR)/include
-+CFLAGS:= ${CFLAGS} -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -DMODVERSIONS --include $(KERNEL_DIR)/include/linux/modversions.h -I$(KERNEL_DIR)/include
-
- all: $(obj-m)
-
-@@ -72,10 +73,10 @@
- install: uninstall-old
- install -D -m 644 slamr.o $(module-dir)/slamr.o
- install -D -m 644 slusb.o $(module-dir)/slusb.o
-- cp /etc/modules.conf /etc/modules.conf.slamr && \
-- echo 'alias char-major-212 slamr' >> /etc/modules.conf && \
-- echo 'alias char-major-213 slusb' >> /etc/modules.conf
-- /sbin/depmod -a
-+# cp /etc/modules.conf /etc/modules.conf.slamr && \
-+# echo 'alias char-major-212 slamr' >> /etc/modules.conf && \
-+# echo 'alias char-major-213 slusb' >> /etc/modules.conf
-+# /sbin/depmod -a
- uninstall:
- /sbin/modprobe -r slamr slusb
- cp /etc/modules.conf /etc/modules.conf.slamr && \
-@@ -102,7 +103,7 @@
- install:
- install -D -m 644 slamr.ko $(module-dir)/slamr.ko
- install -D -m 644 slusb.ko $(module-dir)/slusb.ko
-- /sbin/depmod -a
-+# /sbin/depmod -a
- uninstall:
- modprobe -r slamr ; echo -n
- modprobe -r slusb ; echo -n
-diff -urN slmodem-2.9.7.old/modem/Makefile slmodem-2.9.7/modem/Makefile
---- slmodem-2.9.7.old/modem/Makefile 2003-11-20 04:50:47.000000000 -0800
-+++ slmodem-2.9.7/modem/Makefile 2004-04-21 00:45:34.215271352 -0700
-@@ -13,10 +13,10 @@
- #
- ###########################################################################
-
--CC:= gcc
-+CC:= ${CC}
- RM:= rm -f
-
--CFLAGS:= -Wall -g -O -I. -DCONFIG_DEBUG_MODEM
-+CFLAGS:= ${CFLAGS} -I. -DCONFIG_DEBUG_MODEM
-
-
- modem-objs:= \
diff --git a/net-dialup/slmodem/files/slmodem-2.9.conf b/net-dialup/slmodem/files/slmodem-2.9.conf
index 0fb40baca7a8..745ab4ef0e16 100644
--- a/net-dialup/slmodem/files/slmodem-2.9.conf
+++ b/net-dialup/slmodem/files/slmodem-2.9.conf
@@ -1,28 +1,37 @@
# 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
+DEV=/dev/ttySL0
+COUNTRY=THAILAND
+GROUP=dialout
-MODULE=slamr
-# or MODULE=slusb
+# The following symlink will be created if uncommented
+# LN_DEV=/dev/modem
# Raise priority to reduce modem dropouts
NICE=-6
-# for ALSA users, use the following:
-# DEV=/dev/ttySL0
-# else:
-# DEV=/dev/slamr0
-# DEV=/dev/slusb0
+# ALSA Options:
-LN_DEV=/dev/modem
-#MODEM_DAEMON=/usr/sbin/slmodemd
-COUNTRY=THAILAND
-GROUP=dialout
+# The following sets the ALSA (alsasound) init script to
+# be a dependancy of the slmodem one. It does also provides
+# ALSA support.
+# ALSACONF MODULE=alsa
+
+# The hardware slot
+# ALSACONF HW_SLOT=0
+
+# Non-ALSA OPTIONS:
+
+# PCICONF MODULE=slamr
+# or
+# USBCONF MODULE=slusb
+#
+# Non ALSA- use one of the following:
+# PCICONF MDEV=/dev/slamr0
+# or
+# USBCONF MDEV=/dev/slusb0
-# this must be kept in sync with:
+# this file must be kept in sync with:
# /etc/devfs.d/slmodem (devfs)
# /etc/modules.d/slmodem (devfs)
# /etc/udev/rules.d/55-slmodem.rules (udev)
diff --git a/net-dialup/slmodem/files/slmodem-2.9.init b/net-dialup/slmodem/files/slmodem-2.9.init
index c84eb05d20b8..cf73c450bbc3 100644
--- a/net-dialup/slmodem/files/slmodem-2.9.init
+++ b/net-dialup/slmodem/files/slmodem-2.9.init
@@ -1,11 +1,11 @@
#!/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.7 2004/08/01 09:40:12 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/slmodem/files/slmodem-2.9.init,v 1.8 2004/08/02 02:51:09 dragonheart Exp $
depend() {
need logger
- if [ "${ALSA}" = "yes" ]
+ if [ "${MODULE}" = "alsa" ];
then
need alsasound
fi
@@ -19,41 +19,89 @@ checkconfig() {
fi
}
-start() {
+function loadsalsa {
ebegin "Starting slmodemd for ${DEV}"
+ start-stop-daemon --start --background --nicelevel=${NICE} --make-pidfile \
+ --pidfile /var/run/slmodemd.pid --startas /usr/sbin/slmodemd \
+ -- -country=${COUNTRY} -g=${GROUP} --alsa hw:${HW_SLOT}
+ return ${?}
+}
+function loadsmodule {
modprobe ${MODULE};
+
if [ "$?" -gt 0 ]
then
eerror "Missing ${MODULE}. Please set up /etc/conf.d/slmodem"
eend 1;
- fi
+ fi
#sleep as per http://bugs.gentoo.org/show_bug.cgi?id=47947#c59
+ ebegin "Waiting for ${MODULE} modem driver initialisation"
local COUNT=0
- while [ ! -c ${DEV} -a ${COUNT} -lt 4 ];
+ echo -e "${NORMAL} "
+ echo -ne "${NORMAL}"
+ while [ ! -c ${MDEV} -a ${COUNT} -lt 5 ];
do
- sleep 0.25
- einfo "Waiting for driver initialisation"
+ sleep 0.5
+ echo -ne "."
COUNT=`expr ${COUNT} + 1`
- done
-
- if [ ! -c ${DEV} ];
+ done
+
+ echo -ne "\n"
+
+ if [ ! -c ${MDEV} ];
then
- eerror "Module - ${MODULE} failed to initialise device ${DEVICE}"
+ eerror "Module - ${MODULE} failed to initialise device ${MDEV}"
eend 1
+ else
+ eend 0
fi
+ ebegin "Starting slmodemd for ${DEV}"
start-stop-daemon --start --background --nicelevel=${NICE} --make-pidfile \
--pidfile /var/run/slmodemd.pid --startas /usr/sbin/slmodemd \
- -- -country=${COUNTRY} -g=${GROUP} ${DEV}
- eend $?
+ -- -country=${COUNTRY} -g=${GROUP} ${MDEV}
+ return ${?}
}
-stop() {
- ebegin "Shutting down slmodemd"
- start-stop-daemon --stop --quiet --pidfile /var/run/slmodemd.pid && rm /var/run/slmodemd.pid
- modprobe -r ${MODULE}
- eend $?
+start() {
+
+ checkconfig || return 1
+
+ # either if we use alsa or not, the only thing we need is
+ # ttySL0, which is created by slmodemd when started (points to a pts)
+
+ if [ "${MODULE}" == "alsa" ]; then
+ loadsalsa
+ else
+ loadsmodule
+ fi
+
+ result=${?}
+
+ test ! -z "${LN_DEV}" && /bin/ln -s ${DEV} ${LN_DEV} 2> /dev/null
+
+ eend ${result}
}
+stop() {
+ ebegin "Shutting down slmodemd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/slmodemd.pid && rm /var/run/slmodemd.pid
+ eend ${?}
+ if [ ! "${MODULE}" == "alsa" ];
+ then
+ ebegin "Waiting for ${MODULE} modem driver unload"
+ echo -e "${NORMAL} "
+ echo -ne "${NORMAL}"
+ for ((a=0,result=1; result==1 && a <= 5 ; a++))
+ do
+ sleep 0.25
+ echo -ne "."
+ modprobe -r slamr 2> /dev/null && result=0
+ done
+ echo -ne "\n"
+ eend ${result}
+ fi
+ unlink ${LN_DEV} 2> /dev/null
+}
diff --git a/net-dialup/slmodem/slmodem-2.9.7-r1.ebuild b/net-dialup/slmodem/slmodem-2.9.7-r1.ebuild
deleted file mode 100644
index f68aedd871b7..000000000000
--- a/net-dialup/slmodem/slmodem-2.9.7-r1.ebuild
+++ /dev/null
@@ -1,101 +0,0 @@
-# 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.7-r1.ebuild,v 1.5 2004/07/01 22:10:03 eradicator 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/libc"
-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
- dodir /etc/udev/rules.d/
- echo 'KERNEL="slamr", NAME="slamr0", SYMLINK="modem"' > \
- ${D}/etc/udev/rules.d/55-${PN}.rules
- dodir /etc/udev/permissions.d
- 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() {
- depmod -a
- # 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"
-}
diff --git a/net-dialup/slmodem/slmodem-2.9.7-r2.ebuild b/net-dialup/slmodem/slmodem-2.9.7-r2.ebuild
deleted file mode 100644
index 833f0c8abb45..000000000000
--- a/net-dialup/slmodem/slmodem-2.9.7-r2.ebuild
+++ /dev/null
@@ -1,127 +0,0 @@
-# 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.7-r2.ebuild,v 1.3 2004/07/01 22:10:03 eradicator Exp $
-
-IUSE="alsa"
-
-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"
-RDEPEND="virtual/libc"
-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
- emake MODVERDIR=${T}/.tmp_versions drivers
-
- cd modem;
- 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
- dodir /etc/udev/rules.d/
- echo 'KERNEL="slamr", NAME="slamr0", SYMLINK="modem"' > \
- ${D}/etc/udev/rules.d/55-${PN}.rules
- dodir /etc/udev/permissions.d
- echo 'slamr*:root:dialout:0660' > \
- ${D}/etc/udev/permissions.d/55-${PN}.permissions
- else
- # simple raw devs
- dodir /dev
- cd ${D}/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
- ln -s ttySL0 modem
- fi
-
-}
-
-pkg_postinst() {
- depmod -a
- # 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 reread devfs rules"
- killall -HUP devfsd
- eend 0
- einfo "modules-update to complete configuration."
-
- elif [ -e ${ROOT}/dev/.udev ]
- then
- #doesn't work - looking for fix.
- ebegin "Restarting udevd to reread udev rules"
- # killall -HUP udevd &>/dev/null
- eend 0
- fi
-
- echo
-
- einfo "You must edit /etc/conf.d/${PN} for your configuration"
-
- if use alsa; then
- echo
- einfo "If you need to use snd-intel8x0m from the kernel"
- einfo "compile it as a module and edit etc/module.d/alsa"
- einfo 'to: "alias snd-card-(number) snd-intel8x0m"'
- fi
-}
diff --git a/net-dialup/slmodem/slmodem-2.9.7.ebuild b/net-dialup/slmodem/slmodem-2.9.7.ebuild
deleted file mode 100644
index a1faa51dd312..000000000000
--- a/net-dialup/slmodem/slmodem-2.9.7.ebuild
+++ /dev/null
@@ -1,83 +0,0 @@
-# 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.7.ebuild,v 1.4 2004/07/01 22:10:03 eradicator 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/libc"
-S="${WORKDIR}/${MY_P}"
-
-src_unpack() {
- unpack ${A}
- epatch ${FILESDIR}/${PF}-makefile-fixup.patch
-}
-
-src_compile() {
- if has sandbox ${FEATURES} || has userpriv $FEATURES; then
- ewarn "Users emerging this with a 2.6 kernel still need to disable"
- ewarn "sandbox and userpriv from FEATURES."
- die "bad FEATURES"
- 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/devfs.d/; newins ${FILESDIR}/${PN}-2.9.devfs ${PN}
- insinto /etc/modules.d/; newins ${FILESDIR}/${PN}-2.9.modules ${PN}
- 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
- dodir /dev
- ebegin "Creating /dev/ttySL* devices"
- local C="0"
- while [ "${C}" -lt "4" ]
- do
- if [ ! -c ${ROOT}/dev/ttySL${C} ]
- then
- mknod ${D}/dev/ttySL${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
- fi
-
- echo
- einfo "You must edit /etc/conf.d/${PN} and run"
- einfo "modules-update to complete configuration."
-}
diff --git a/net-dialup/slmodem/slmodem-2.9.9-r1.ebuild b/net-dialup/slmodem/slmodem-2.9.9-r1.ebuild
new file mode 100644
index 000000000000..7bfbf506b5e2
--- /dev/null
+++ b/net-dialup/slmodem/slmodem-2.9.9-r1.ebuild
@@ -0,0 +1,162 @@
+# 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-r1.ebuild,v 1.1 2004/08/02 02:51:09 dragonheart Exp $
+
+inherit kmod eutils
+
+DESCRIPTION="Driver for Smart Link modem"
+HOMEPAGE="http://www.smlink.com/"
+SRC_URI="http://www.smlink.com/main/down/${P}.tar.gz"
+LICENSE="Smart-Link"
+SLOT="${KV}"
+KEYWORDS="~x86"
+IUSE="alsa usb"
+
+DEPEND="virtual/libc
+ alsa? ( media-libs/alsa-lib )
+ virtual/os-headers"
+
+RDEPEND="virtual/libc
+ alsa? ( media-libs/alsa-lib )"
+
+src_unpack() {
+ # Unpack and set some variables
+ kmod_src_unpack
+
+ cd ${S}
+ epatch ${FILESDIR}/${P}-makefile-fixup.patch
+}
+
+src_compile() {
+
+ #[ -d ${KV_OUTPUT} ] || die "Build kernel ${KV_VERSION_FULL} first"
+
+ export KERNEL_OUTPUT_DIR=${S}/workdir
+
+ if is_kernel 2 5 || is_kernel 2 6
+ then
+ unset ARCH
+ fi
+
+ if use alsa
+ then
+ export SUPPORT_ALSA=1
+ else
+ export SUPPORT_ALSA=0
+ fi
+
+ mkdir ${S}/workdir
+
+ emake -C ${S} \
+ KERNEL_VER=${KV_VERSION_FULL} \
+ KERNEL_DIR=${KV_OUTPUT} \
+ KERNEL_INCLUDES=/usr/include/linux \
+ all || die "Failed to compile driver"
+
+}
+
+#src_test() {
+# 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() {
+ unset ARCH
+ emake DESTDIR=${D} \
+ KERNEL_VER=${KV_VERSION_FULL} \
+ install-drivers install-test\
+ || die "driver install failed"
+
+ mv ${D}/usr/sbin/modem_test ${D}/usr/sbin/slmodem_test
+
+ dosbin modem/slmodemd
+ dodir /var/lib/slmodem
+ fowners root:dialout /var/lib/slmodem
+
+ 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/# ALSACONF //g" ${D}/etc/conf.d/slmodem
+ else
+ sed -i -e "s/# NONALSACONF //g" ${D}/etc/conf.d/slmodem
+ if use usb
+ then
+ sed -i -e "s/# USBCONF //g" ${D}/etc/conf.d/slmodem
+ else
+ sed -i -e "s/# PCICONF //g" ${D}/etc/conf.d/slmodem
+ fi
+ fi
+ sed -i -e "s/ALSACONF//g" -e "s/PCICONF//g" -e "s/USBCONF//g" ${D}/etc/conf.d/slmodem
+
+
+ # 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
+ # check Symlink
+ dodir /etc/udev/rules.d/
+ echo 'KERNEL="slamr", NAME="slamr0", SYMLINK="modem"' > \
+ ${D}/etc/udev/rules.d/55-${PN}.rules
+ dodir /etc/udev/permissions.d
+ echo 'slamr*:root:dialout:0660' > \
+ ${D}/etc/udev/permissions.d/55-${PN}.permissions
+ else
+ make -C drivers DESTDIR=${D} KERNELRELEASE=1 KERNEL_VER=${KV_VERSION_FULL} install-devices
+ fi
+
+}
+
+pkg_postinst() {
+ kmod_pkg_postinst
+
+ #depmod -a
+
+ # 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 reread devfs rules"
+ killall -HUP devfsd
+ eend 0
+ einfo "modules-update to complete configuration."
+
+ elif [ -e ${ROOT}/dev/.udev ]
+ then
+ ebegin "Restarting udev to reread udev rules"
+ udevstart
+ eend 0
+ fi
+
+ echo
+
+ 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 alsasound 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"
+ einfo 'to: "alias snd-card-(number) snd-intel8x0m"'
+ fi
+}