summaryrefslogtreecommitdiff
path: root/net/speedtouch
diff options
context:
space:
mode:
authorskrll <skrll>2004-12-23 18:11:18 +0000
committerskrll <skrll>2004-12-23 18:11:18 +0000
commite7cb22adf33b91cb637f719c07a139f896b0b34d (patch)
tree854027673e974e327c13de1b955ace7312b27870 /net/speedtouch
parent1bc3ad43d8a4c83c4f7374951b412a76a2e59c8c (diff)
downloadpkgsrc-e7cb22adf33b91cb637f719c07a139f896b0b34d.tar.gz
Update speedtouch to 1.3.1.
The main changes is to support revision 4 modems (silver cycle helmet/beetle) and to use the threaded pppo3 if native threads are available. Tested on: - stringray by David Brownlee (abs@) and me - purple cycle helmet/beetle by David Brownlee - silver cycle helment/beetle by me
Diffstat (limited to 'net/speedtouch')
-rw-r--r--net/speedtouch/Makefile44
-rw-r--r--net/speedtouch/PLIST28
-rw-r--r--net/speedtouch/distinfo16
-rw-r--r--net/speedtouch/files/adsl.sh66
-rw-r--r--net/speedtouch/patches/patch-aa31
-rw-r--r--net/speedtouch/patches/patch-ab16
-rw-r--r--net/speedtouch/patches/patch-ac86
-rw-r--r--net/speedtouch/patches/patch-ad27
-rw-r--r--net/speedtouch/patches/patch-ae13
9 files changed, 256 insertions, 71 deletions
diff --git a/net/speedtouch/Makefile b/net/speedtouch/Makefile
index 4d63741364c..42aaecc71fd 100644
--- a/net/speedtouch/Makefile
+++ b/net/speedtouch/Makefile
@@ -1,23 +1,35 @@
-# $NetBSD: Makefile,v 1.12 2004/12/19 16:48:36 abs Exp $
+# $NetBSD: Makefile,v 1.13 2004/12/23 18:11:18 skrll Exp $
#
-DISTNAME= speedtouch-1.2-beta2
-PKGREVISION= 3
-CATEGORIES= net
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=speedtouch/} \
- http://www.alcatel.com/consumer/dsl/
-DISTFILES= ${DISTNAME}.tar.bz2 speedmgmt.tar.gz
+DISTNAME= speedtouch-1.3.1
+CATEGORIES= net
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=speedtouch/}
+DISTFILES= ${DISTNAME}.tar.bz2
-MAINTAINER= abs@NetBSD.org
-HOMEPAGE= http://www.xsproject.org/speedtouch/
-COMMENT= Alcatel SpeedTouch USB ADSL modem driver
+#
+# Firmware license and link from:
+# http://www.speedtouch.com/driver_upgrade_lx_3.0.1.2.htm
+#
+FIRMWARE_SRCS= SpeedTouch330_firmware_3012.zip
+SITES_${FIRMWARE_SRCS}= http://www.speedtouch.com/download/drivers/USB/
+DISTFILES+= ${FIRMWARE_SRCS}
+EXTRACT_CMD_OPTS.zip= -Laqo -d ${WRKDIR}/firmware
+
+LICENSE= speedtouch-firmware-license
+
+MAINTAINER= abs@NetBSD.org
+HOMEPAGE= http://www.xsproject.org/speedtouch/
+COMMENT= Alcatel SpeedTouch USB ADSL modem driver
+
+DEPENDS+= userppp>=001107:../../net/userppp
-DEPENDS+= userppp>=001107:../../net/userppp
+USE_PKGINSTALL= yes
+GNU_CONFIGURE= yes
-USE_PKGINSTALL= yes
-GNU_CONFIGURE= yes
+RCD_SCRIPTS= adsl
-RCD_SCRIPTS= adsl
+pre-extract:
+ ${MKDIR} ${WRKDIR}/firmware
SAMPLECONF= ${WRKSRC}/doc-bsd/ppp.conf.sample
@@ -26,6 +38,8 @@ post-build:
${SED} 's:/usr/local:${PREFIX}:' ${SAMPLECONF}.pre > ${SAMPLECONF}
post-install:
- ${INSTALL_DATA} ${WRKDIR}/mgmt/mgmt.o ${PREFIX}/libdata/alcaudsl.sys
+ ${INSTALL_DATA_DIR} ${PREFIX}/libdata/speedtouch
+ ${INSTALL_DATA} ${WRKDIR}/firmware/kqd6_3.012 ${PREFIX}/libdata/speedtouch
+ ${INSTALL_DATA} ${WRKDIR}/firmware/zzzl_3.012 ${PREFIX}/libdata/speedtouch
.include "../../mk/bsd.pkg.mk"
diff --git a/net/speedtouch/PLIST b/net/speedtouch/PLIST
index 5432ca01a42..0e681b2ca32 100644
--- a/net/speedtouch/PLIST
+++ b/net/speedtouch/PLIST
@@ -1,10 +1,18 @@
-@comment $NetBSD: PLIST,v 1.3 2003/11/07 11:06:17 abs Exp $
-libdata/alcaudsl.sys
-man/man1/modem_run.1
-man/man1/pppoa2.1
-man/man1/pppoa3.1
+@comment $NetBSD: PLIST,v 1.4 2004/12/23 18:11:18 skrll Exp $
+bin/speedtouch-setup
+bin/speedtouch-start
+bin/speedtouch-stop
+libdata/speedtouch/kqd6_3.012
+libdata/speedtouch/zzzl_3.012
+man/man1/speedtouch-setup.1
+man/man1/speedtouch-start.1
+man/man1/speedtouch-stop.1
+man/man8/modem_run.8
+man/man8/pppoa2.8
+man/man8/pppoa3.8
sbin/modem_run
sbin/pppoa2
+sbin/pppoa3
share/doc/speedtouch/FAQ
share/doc/speedtouch/FAQ-fr
share/doc/speedtouch/INSTALL
@@ -12,7 +20,11 @@ share/doc/speedtouch/INSTALL-de
share/doc/speedtouch/INSTALL-fr
share/doc/speedtouch/INSTALL-it
share/doc/speedtouch/INSTALL-nl
-share/examples/speedtouch/adsl.sh
-share/examples/speedtouch/ppp.conf
-@dirrm share/doc/speedtouch
+share/doc/speedtouch/ppp.conf.sample
+share/examples/speedtouch/adsl.sh.sample
+share/examples/speedtouch/ppp.conf.sample
+share/speedtouch/boot.v123.bin
+@dirrm share/speedtouch
@dirrm share/examples/speedtouch
+@dirrm share/doc/speedtouch
+@dirrm libdata/speedtouch
diff --git a/net/speedtouch/distinfo b/net/speedtouch/distinfo
index 1e264513124..3d95208e03e 100644
--- a/net/speedtouch/distinfo
+++ b/net/speedtouch/distinfo
@@ -1,7 +1,11 @@
-$NetBSD: distinfo,v 1.5 2003/11/07 11:06:17 abs Exp $
+$NetBSD: distinfo,v 1.6 2004/12/23 18:11:18 skrll Exp $
-SHA1 (speedtouch-1.2-beta2.tar.bz2) = 7a09eaf3f462a735dc5cf261b7668b7582d86663
-Size (speedtouch-1.2-beta2.tar.bz2) = 170497 bytes
-SHA1 (speedmgmt.tar.gz) = 15314d3c53b1b4d3af92f247ac1ef8a825da1479
-Size (speedmgmt.tar.gz) = 293547 bytes
-SHA1 (patch-aa) = 6c8524fc7f462055803d2cc4833c3aa7293b339b
+SHA1 (speedtouch-1.3.1.tar.bz2) = 9f2bd1d2800686fa96b38bb3de8283fcf5b39a5c
+Size (speedtouch-1.3.1.tar.bz2) = 197709 bytes
+SHA1 (SpeedTouch330_firmware_3012.zip) = 4fd2eefda958fd34ab4df43cffdda4e7757fbd34
+Size (SpeedTouch330_firmware_3012.zip) = 769125 bytes
+SHA1 (patch-aa) = 65102f1f6ee9839003765538d83a34472d9804e7
+SHA1 (patch-ab) = dd6e17f0ad153cbe57055ff843467617dae0c311
+SHA1 (patch-ac) = 38988d90e2827dddff0d52b1bf8c987574a96cf8
+SHA1 (patch-ad) = 14cb77ff43a7df73791920eb883b32805ff25cc9
+SHA1 (patch-ae) = ef41e43b28ce7b9310d37f6babf36cf22971d664
diff --git a/net/speedtouch/files/adsl.sh b/net/speedtouch/files/adsl.sh
index 6b3cba23016..036c2dd331a 100644
--- a/net/speedtouch/files/adsl.sh
+++ b/net/speedtouch/files/adsl.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: adsl.sh,v 1.5 2003/11/07 11:17:58 abs Exp $
+# $NetBSD: adsl.sh,v 1.6 2004/12/23 18:11:18 skrll Exp $
#
# PROVIDE: adsl
# REQUIRE: NETWORKING
@@ -9,40 +9,60 @@
# On systems with rc.d you will need to copy this to /etc/rc.d and set
# 'adsl=YES' in /etc/rc.conf
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+name="adsl"
+rcvar=${name}
+required_files="@PKG_SYSCONFDIR@/ppp/ppp.conf"
+start_cmd="adsl_start"
+stop_cmd="adsl_stop"
+
adsl_start()
{
echo "Starting speedtouch adsl."
+ #
+ # Make sure we can see a modem and determine which revision
+ # it is.
+ #
+ case `usbdevs -v | awk '/Speed Touch.*rev/ {print $NF}'` in
+ 0.00|2.00)
+ firmware=kqd6_3.012 ;;
+ 4.00)
+ firmware=zzzl_3.012 ;;
+ *)
+ echo "No Speed Touch modem found."
+ exit 1 ;;
+ esac
+
# Ensure we have at least tun0 - NetBSD 1.6 and later
ifconfig tun0 >/dev/null 2>&1 || ifconfig tun0 create
- @PREFIX@/sbin/modem_run -f @PREFIX@/libdata/alcaudsl.sys -m
+ if ! @PREFIX@/sbin/modem_run -f @PREFIX@/libdata/speedtouch/$firmware; then
+ echo "Couldn't download firmware to modem."
+ exit 1
+ fi
+
@PREFIX@/sbin/ppp -ddial adsl
}
adsl_stop()
{
- PID=`ps ax | awk '/ppp -ddial adsl $/{print $1}'`
- if [ -n "$PID" ]; then
- echo "Stopping speedtouch adsl."
- kill $PID
+ PPID="`ps ax | awk '/ppp -ddial adsl$/{print $1}'`
+ MPID="`ps ax | awk '/modem_run -f /{print $1}'`
+ if [ -n "$PPID $MPID" ]; then
+ echo "Stopping speedtouch adsl."
+ for pid in $PPID $MPID; do
+ kill $pid
+ done
fi
}
-if [ ! -d /etc/rc.d ]
+if [ -f /etc/rc.subr ]
then
- case "$1" in
- start) adsl_start ;;
- stop) adsl_stop ;;
- rstart) adsl_stop ; adsl_start ;;
- esac
- exit
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ echo -n ' ${name}'
+ exec ${command} ${smbd_flags} ${command_args}
fi
-
-. /etc/rc.subr
-
-name="adsl"
-rcvar=$name
-start_cmd="adsl_start"
-stop_cmd="adsl_stop"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/net/speedtouch/patches/patch-aa b/net/speedtouch/patches/patch-aa
index 71be17bb884..0399f440374 100644
--- a/net/speedtouch/patches/patch-aa
+++ b/net/speedtouch/patches/patch-aa
@@ -1,22 +1,15 @@
-$NetBSD: patch-aa,v 1.4 2003/11/07 11:06:17 abs Exp $
+$NetBSD: patch-aa,v 1.5 2004/12/23 18:11:18 skrll Exp $
---- doc-bsd/Makefile.in.orig Fri Nov 7 01:56:49 2003
+--- doc-bsd/Makefile.in.orig 2004-06-10 17:36:35.000000000 +0100
+++ doc-bsd/Makefile.in
-@@ -88,14 +88,14 @@ all :
-
- install : install-man
- @test -d $(datadir)/doc/speedtouch || $(INSTALL) -c -d $(datadir)/doc/speedtouch
-- @test -d $(prefix)/etc/rc.d || $(INSTALL) -c -d $(prefix)/etc/rc.d
-- $(INSTALL) -m 0744 -o $(installuser) adsl.sh.sample $(prefix)/etc/rc.d
-+ @test -d $(datadir)/examples/speedtouch || $(INSTALL) -c -d $(datadir)/examples/speedtouch
-+ $(INSTALL) -m 0744 -o $(installuser) adsl.sh.sample $(datadir)/examples/speedtouch/adsl.sh
-+ $(INSTALL) -m 0444 -o $(installuser) ppp.conf.sample $(datadir)/examples/speedtouch/ppp.conf
- $(INSTALL) -m 0444 -o $(installuser) INSTALL $(datadir)/doc/speedtouch
- $(INSTALL) -m 0444 -o $(installuser) INSTALL-de $(datadir)/doc/speedtouch
- $(INSTALL) -m 0444 -o $(installuser) INSTALL-fr $(datadir)/doc/speedtouch
- $(INSTALL) -m 0444 -o $(installuser) INSTALL-it $(datadir)/doc/speedtouch
- $(INSTALL) -m 0444 -o $(installuser) INSTALL-nl $(datadir)/doc/speedtouch
-- $(INSTALL) -m 0444 -o $(installuser) ppp.conf.sample $(datadir)/doc/speedtouch
- $(INSTALL) -m 0444 -o $(installuser) FAQ $(datadir)/doc/speedtouch
- $(INSTALL) -m 0444 -o $(installuser) FAQ-fr $(datadir)/doc/speedtouch
+@@ -93,7 +93,9 @@ all :
+ install: install-man
+ @test -d "$(prefix)/etc/rc.d" || $(INSTALL) -c -d "$(prefix)/etc/rc.d"
+- $(INSTALL) -m 0744 -o $(installuser) adsl.sh.sample "$(prefix)/etc/rc.d"
++ @test -d "$(datadir)/examples/speedtouch" || $(INSTALL) -c -d $(datadir)/examples/speedtouch
++ $(INSTALL) -m 0744 -o $(installuser) adsl.sh.sample $(datadir)/examples/speedtouch
++ $(INSTALL) -m 0444 -o $(installuser) ppp.conf.sample $(datadir)/examples/speedtouch
+ @test -d "$(docdir)" || $(INSTALL) -c -d "$(docdir)"
+ $(INSTALL) -m 0444 -o $(installuser) INSTALL "$(docdir)"
+ $(INSTALL) -m 0444 -o $(installuser) INSTALL-de "$(docdir)"
diff --git a/net/speedtouch/patches/patch-ab b/net/speedtouch/patches/patch-ab
new file mode 100644
index 00000000000..dfb3882a31c
--- /dev/null
+++ b/net/speedtouch/patches/patch-ab
@@ -0,0 +1,16 @@
+$NetBSD: patch-ab,v 1.4 2004/12/23 18:11:18 skrll Exp $
+
+--- configure.in.orig 2004-09-29 21:56:31.000000000 +0100
++++ configure.in
+@@ -112,8 +112,9 @@ case "$host" in
+ AC_DEFINE(FREEBSD)
+ ;;
+ *-netbsd*)
+- st_compile="modem_run pppoa2"
+- AC_MSG_WARN(pthread lib not yet supported)
++ st_compile="modem_run pppoa2 pppoa3"
++ AC_CHECK_LIB(pthread, pthread_create, THREAD_LIBS="-pthread",
++ [AC_MSG_WARN(pthread lib wasn't found : pppoa3 won't be compiled); st_compile="modem_run pppoa2"])
+ DOCDIR="doc-bsd"
+ PUSB_SOURCE="pusb-bsd.c"
+ AC_DEFINE(NETBSD)
diff --git a/net/speedtouch/patches/patch-ac b/net/speedtouch/patches/patch-ac
new file mode 100644
index 00000000000..7cd998950d4
--- /dev/null
+++ b/net/speedtouch/patches/patch-ac
@@ -0,0 +1,86 @@
+$NetBSD: patch-ac,v 1.3 2004/12/23 18:11:18 skrll Exp $
+
+--- configure.orig 2004-03-17 22:52:46.000000000 +0000
++++ configure
+@@ -4574,9 +4574,78 @@ _ACEOF
+
+ ;;
+ *-netbsd*)
+- st_compile="modem_run pppoa2"
+- { echo "$as_me:$LINENO: WARNING: pthread lib not yet supported" >&5
+-echo "$as_me: WARNING: pthread lib not yet supported" >&2;}
++ st_compile="modem_run pppoa2 pppoa3"
++ echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
++echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
++if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lpthread $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++/* Override any gcc2 internal prototype to avoid an error. */
++#ifdef __cplusplus
++extern "C"
++#endif
++/* We use char because int might match the return type of a gcc2
++ builtin and then its argument prototype would still apply. */
++char pthread_create ();
++int
++main ()
++{
++pthread_create ();
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++ (eval $ac_link) 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } &&
++ { ac_try='test -z "$ac_c_werror_flag"
++ || test ! -s conftest.err'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; } &&
++ { ac_try='test -s conftest$ac_exeext'
++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); }; }; then
++ ac_cv_lib_pthread_pthread_create=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_lib_pthread_pthread_create=no
++fi
++rm -f conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
++echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
++if test $ac_cv_lib_pthread_pthread_create = yes; then
++ THREAD_LIBS="-pthread"
++else
++ { echo "$as_me:$LINENO: WARNING: pthread lib wasn't found : pppoa3 won't be compiled" >&5
++echo "$as_me: WARNING: pthread lib wasn't found : pppoa3 won't be compiled" >&2;}; st_compile="modem_run pppoa2"
++fi
++
+ DOCDIR="doc-bsd"
+ PUSB_SOURCE="pusb-bsd.c"
+ cat >>confdefs.h <<\_ACEOF
diff --git a/net/speedtouch/patches/patch-ad b/net/speedtouch/patches/patch-ad
new file mode 100644
index 00000000000..f49026d544c
--- /dev/null
+++ b/net/speedtouch/patches/patch-ad
@@ -0,0 +1,27 @@
+$NetBSD: patch-ad,v 1.3 2004/12/23 18:11:18 skrll Exp $
+
+--- src/Makefile.in.orig 2004-09-29 21:56:31.000000000 +0100
++++ src/Makefile.in
+@@ -114,19 +114,19 @@ all: ${make_bindir}
+
+ speedtouch-setup: speedtouch-setup.in Makefile
+ rm -f $@ $@.tmp
+- $(edit) < $< > $@.tmp
++ $(edit) speedtouch-setup.in > $@.tmp
+ chmod a+x $@.tmp
+ mv $@.tmp $@
+
+ speedtouch-start: speedtouch-start.in Makefile
+ rm -f $@ $@.tmp
+- $(edit) < $< > $@.tmp
++ $(edit) speedtouch-start.in > $@.tmp
+ chmod a+x $@.tmp
+ mv $@.tmp $@
+
+ speedtouch-stop: speedtouch-stop.in Makefile
+ rm -f $@ $@.tmp
+- $(edit) < $< > $@.tmp
++ $(edit) speedtouch-stop.in > $@.tmp
+ chmod a+x $@.tmp
+ mv $@.tmp $@
+
diff --git a/net/speedtouch/patches/patch-ae b/net/speedtouch/patches/patch-ae
new file mode 100644
index 00000000000..7a6cba35eed
--- /dev/null
+++ b/net/speedtouch/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1 2004/12/23 18:11:18 skrll Exp $
+
+--- hotplug/Makefile.in.orig 2004-09-29 21:56:31.000000000 +0100
++++ hotplug/Makefile.in
+@@ -28,7 +28,7 @@ all: speedtouch
+
+ speedtouch: speedtouch.in Makefile
+ rm -f $@ $@.tmp
+- $(edit) < $< > $@.tmp
++ $(edit) speedtouch.in > $@.tmp
+ chmod a+x $@.tmp
+ mv $@.tmp $@
+