summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2004-12-23 20:57:46 +0000
committerAlin Năstac <mrness@gentoo.org>2004-12-23 20:57:46 +0000
commit59a8c65661fa7a74897231695f2234f1ab55dad5 (patch)
tree71992be8a9e9cd1ff65e379522908b9dd01adf13 /net-dialup
parentPF -> P again (diff)
downloadhistorical-59a8c65661fa7a74897231695f2234f1ab55dad5.tar.gz
historical-59a8c65661fa7a74897231695f2234f1ab55dad5.tar.bz2
historical-59a8c65661fa7a74897231695f2234f1ab55dad5.zip
hotplug support; new firmware path /lib/firmware; cleaned up old ebuilds (#75117)
Diffstat (limited to 'net-dialup')
-rw-r--r--net-dialup/capi4k-utils/ChangeLog16
-rw-r--r--net-dialup/capi4k-utils/Manifest27
-rw-r--r--net-dialup/capi4k-utils/capi4k-utils-20040810.ebuild65
-rw-r--r--net-dialup/capi4k-utils/capi4k-utils-20041006-r4.ebuild (renamed from net-dialup/capi4k-utils/capi4k-utils-20041006-r2.ebuild)49
-rw-r--r--net-dialup/capi4k-utils/capi4k-utils-20041006.ebuild81
-rw-r--r--net-dialup/capi4k-utils/files/20041006/README.gentoo7
-rw-r--r--net-dialup/capi4k-utils/files/20041006/capi.blacklist24
-rw-r--r--net-dialup/capi4k-utils/files/20041006/capi.confd11
-rw-r--r--net-dialup/capi4k-utils/files/20041006/capi.hotplug95
-rw-r--r--net-dialup/capi4k-utils/files/20041006/capi.initd54
-rw-r--r--net-dialup/capi4k-utils/files/20041006/capi.usermap8
-rw-r--r--net-dialup/capi4k-utils/files/capi-init-2004081025
-rw-r--r--net-dialup/capi4k-utils/files/capi-init-2004100625
-rw-r--r--net-dialup/capi4k-utils/files/capi4k-utils-2004-10-06-fPIC.patch10
-rw-r--r--net-dialup/capi4k-utils/files/capi4k-utils-2004-10-06.patch55
-rw-r--r--net-dialup/capi4k-utils/files/digest-capi4k-utils-200408101
-rw-r--r--net-dialup/capi4k-utils/files/digest-capi4k-utils-200410061
-rw-r--r--net-dialup/capi4k-utils/files/digest-capi4k-utils-20041006-r4 (renamed from net-dialup/capi4k-utils/files/digest-capi4k-utils-20041006-r2)0
18 files changed, 253 insertions, 301 deletions
diff --git a/net-dialup/capi4k-utils/ChangeLog b/net-dialup/capi4k-utils/ChangeLog
index 234b64e7e3ce..e1990a20c284 100644
--- a/net-dialup/capi4k-utils/ChangeLog
+++ b/net-dialup/capi4k-utils/ChangeLog
@@ -1,6 +1,20 @@
# ChangeLog for net-dialup/capi4k-utils
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/ChangeLog,v 1.23 2004/11/27 13:25:29 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/ChangeLog,v 1.24 2004/12/23 20:57:46 mrness Exp $
+
+*capi4k-utils-20041006-r4 (23 Dec 2004)
+
+ 23 Dec 2004; Alin Nastac <mrness@gentoo.org> -files/capi-init-20040810,
+ -files/capi-init-20041006, -files/capi4k-utils-2004-10-06-fPIC.patch,
+ -files/capi4k-utils-2004-10-06.patch, files/20041006/README.gentoo,
+ +files/20041006/capi.blacklist, +files/20041006/capi.confd,
+ +files/20041006/capi.hotplug, +files/20041006/capi.initd,
+ +files/20041006/capi.usermap, -capi4k-utils-20040810.ebuild,
+ -capi4k-utils-20041006-r2.ebuild, +capi4k-utils-20041006-r4.ebuild,
+ -capi4k-utils-20041006.ebuild:
+ Add hotplug support, thanks to Stefan Briesenick <sbriesen@gmx.de> (#75117).
+ The new standard path for firmware files is /lib/firmware, which now is the
+ first search path along with other usual paths. Cleaned up old ebuilds.
*capi4k-utils-20041006-r3 (27 Nov 2004)
diff --git a/net-dialup/capi4k-utils/Manifest b/net-dialup/capi4k-utils/Manifest
index bf6e959af63d..736948308621 100644
--- a/net-dialup/capi4k-utils/Manifest
+++ b/net-dialup/capi4k-utils/Manifest
@@ -1,28 +1,25 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-MD5 8a68cd59daa9bd143ce9987778320b62 capi4k-utils-20040810.ebuild 1760
-MD5 22354caf6445da21e5ebe8609a9e7012 capi4k-utils-20041006.ebuild 2267
MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163
-MD5 e5cbba6a97af8564ce8d7440b54a00af ChangeLog 3788
-MD5 14934f8116c6271b1b71056bd87ff126 capi4k-utils-20041006-r2.ebuild 3181
+MD5 d9f8efa555287b50181314e6ab7caa5c ChangeLog 4565
MD5 0cbd50a0b8f76e4a8697ba30adeb0672 capi4k-utils-20041006-r3.ebuild 3238
-MD5 befd926d2f898c15846c2f7452853ec1 files/capi-init-20040810 609
-MD5 b1de4263d145b4fb13baf0e4791e49a0 files/capi-init-20041006 617
-MD5 9bc030e6ab061e50f16efb0def04f0b6 files/capi4k-utils-2004-10-06-fPIC.patch 286
-MD5 8b4a7394c2826badb822b9575dbfbd4d files/capi4k-utils-2004-10-06.patch 2144
-MD5 daf5a35ac5aeac77c4ac69274ed15395 files/digest-capi4k-utils-20040810 75
-MD5 f2524d2cc37ffcbc2096a4f0ac7177c7 files/digest-capi4k-utils-20041006 75
-MD5 5567e0f076f3d1faafcd0d4fa39a1c4e files/digest-capi4k-utils-20041006-r2 156
+MD5 d97441e319d8b2582c310520726f501d capi4k-utils-20041006-r4.ebuild 3738
MD5 5567e0f076f3d1faafcd0d4fa39a1c4e files/digest-capi4k-utils-20041006-r3 156
-MD5 2c94e9d125d5c9af8c485d8b844f55a2 files/20041006/README.gentoo 1548
+MD5 5567e0f076f3d1faafcd0d4fa39a1c4e files/digest-capi4k-utils-20041006-r4 156
+MD5 e74f9b822b6f485ca6ff834c2699151a files/20041006/README.gentoo 1492
MD5 f9d08e560e844f4556da1f58bb5513b4 files/20041006/capi.init 829
MD5 edc50538053b658093927f9fb28c3aff files/20041006/config 195
MD5 2fe94d2623c5b129780b72bacaf4a7bc files/20041006/rcapid.xinetd 236
+MD5 650c413593fe44524150e1365965cdb3 files/20041006/capi.blacklist 455
+MD5 fb9f9b4003d8d1647e23cf7b329386f6 files/20041006/capi.confd 424
+MD5 2ddf9c04a03949cb2301888586096bfe files/20041006/capi.hotplug 2435
+MD5 52be2456f464fdaca472a9e38d4aca03 files/20041006/capi.initd 1189
+MD5 fa4cf0be46c4a16a2ef6fd178ed54c01 files/20041006/capi.usermap 1504
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
-iD8DBQFBqIBSjtv59x0+BrURAqq6AJ4lSs9FEgyRhYcS5tBRfJI9WOmDOQCeL/l7
-1nDG4Tn3oL5yn5JQikWPsnI=
-=j5Ui
+iD8DBQFByzFXjtv59x0+BrURAu7NAJ9vOAQp75qu06Mt4206/jkkVx3CvQCgmVYj
+QFsx3dzSTN8mzrHy1/Fvl2o=
+=tS4m
-----END PGP SIGNATURE-----
diff --git a/net-dialup/capi4k-utils/capi4k-utils-20040810.ebuild b/net-dialup/capi4k-utils/capi4k-utils-20040810.ebuild
deleted file mode 100644
index 35aa80a92826..000000000000
--- a/net-dialup/capi4k-utils/capi4k-utils-20040810.ebuild
+++ /dev/null
@@ -1,65 +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/capi4k-utils/capi4k-utils-20040810.ebuild,v 1.3 2004/10/14 20:08:30 dholm Exp $
-
-YEAR_PV=${PV:0:4}
-MON_PV=${PV:4:2}
-DAY_PV=${PV:6:2}
-
-MY_P=${PN}-${YEAR_PV}-${MON_PV}-${DAY_PV}
-
-S=${WORKDIR}/${PN}
-DESCRIPTION="Capi4Linux Utils"
-SRC_URI="ftp://ftp.in-berlin.de/pub/capi4linux/${MY_P}.tar.gz ftp://ftp.in-berlin.de/pub/capi4linux/OLD/${MY_P}.tar.gz"
-HOMEPAGE="ftp://ftp.in-berlin.de/pub/capi4linux/"
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="x86 ~ppc"
-IUSE=""
-
-DEPEND="virtual/linux-sources
- dev-lang/perl
- >=sys-apps/sed-4
- virtual/os-headers"
-
-RDEPEND=""
-
-src_unpack() {
- unpack ${A}
- cd ${S}
- sed -i -e 's:linux/capi.h>$:linux/compiler.h>\n#include <linux/capi.h>:g' */*.c
-}
-
-
-src_compile() {
-
- env CONFIG_SBINDIR=/usr/sbin CONFIG_BINDIR=/usr/bin CONFIG_MANDIR=/usr/share/man \
- emake subconfig || die
- emake || die
-}
-
-src_install() {
- dodir /dev
- emake DESTDIR=${D} install || die
- rm -rf ${D}/dev
- newdoc rcapid/README README.rcapid
- newdoc pppdcapiplugin/README README.pppdcapiplugin
- docinto examples.pppdcapiplugin; dodoc pppdcapiplugin/examples/*
- newinitd ${FILESDIR}/capi-init-${PV} capi
- insinto /etc
- insopts -m 0600
- doins capiinit/capi.conf
-}
-
-pkg_postinst() {
- einfo "To use isdn4linux with CAPI replace"
- einfo "I4L_MODULE=\"hisax\" with I4L_MODULE=\"capidrv\","
- einfo "start /etc/init.d/capi and load the module"
- einfo "capidrv."
- einfo ""
- einfo "Annotation for active AVM ISDN boards (B1 ISA/PCI, ...):"
- einfo "Please download the latest firmware from"
- einfo "ftp://ftp.in-berlin.de/pub/capi4linux and copy the files "
- einfo "to /usr/lib/isdn and check your /etc/capi.conf file"
- einfo ""
-}
diff --git a/net-dialup/capi4k-utils/capi4k-utils-20041006-r2.ebuild b/net-dialup/capi4k-utils/capi4k-utils-20041006-r4.ebuild
index 75932dd3e5e7..ccb57351b75a 100644
--- a/net-dialup/capi4k-utils/capi4k-utils-20041006-r2.ebuild
+++ b/net-dialup/capi4k-utils/capi4k-utils-20041006-r4.ebuild
@@ -1,28 +1,26 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/capi4k-utils-20041006-r2.ebuild,v 1.8 2004/11/27 13:25:29 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/capi4k-utils-20041006-r4.ebuild,v 1.1 2004/12/23 20:57:46 mrness Exp $
inherit eutils
YEAR_PV=${PV:0:4}
MON_PV=${PV:4:2}
DAY_PV=${PV:6:2}
-
-MY_FILES=${FILESDIR}/${PV}
MY_P=${PN}-${YEAR_PV}-${MON_PV}-${DAY_PV}
-PPPVERSIONS="2.4.2" # versions in portage
+PPPVERSIONS="2.4.2 2.4.3" # versions in portage
DESCRIPTION="CAPI4Linux Utils"
HOMEPAGE="ftp://ftp.in-berlin.de/pub/capi4linux/"
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="x86 ~amd64 ~ppc"
-IUSE=""
-S=${WORKDIR}/${PN}
SRC_URI="ftp://ftp.in-berlin.de/pub/capi4linux/${MY_P}.tar.gz
ftp://ftp.in-berlin.de/pub/capi4linux/OLD/${MY_P}.tar.gz
mirror://gentoo/${P}-patches.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc"
+IUSE=""
+
DEPEND="virtual/linux-sources
dev-lang/perl
>=sys-apps/sed-4
@@ -32,13 +30,16 @@ DEPEND="virtual/linux-sources
sys-devel/libtool"
RDEPEND=""
+S=${WORKDIR}/${PN}
+
src_unpack() {
unpack ${A} || die "failed to unpack sources"
cd ${S}
# set our config
- cp -f ${MY_FILES}/config .config
+ cp -f ${FILESDIR}/${PV}/config .config
# fix the little odd bugs
- epatch ${WORKDIR}/${PN}.diff || die "patch failed"
+ EPATCH_OPTS="-p1"
+ epatch ${WORKDIR}/${PN}.diff ${WORKDIR}/ppp-2.4.3.diff || die "${PN} patch failed"
# patch includes of all *.c files
sed -i -e "s:linux/capi.h>$:linux/compiler.h>\n#include <linux/capi.h>:g" */*.c || die "sed failed"
# patch all Makefile.am and Rules.make to use our CFLAGS
@@ -47,6 +48,8 @@ src_unpack() {
sed -i -e "s:^\(libcapi20_la_CFLAGS = \):\1-fPIC :g" capi20/Makefile.am || die "sed failed"
# patch pppdcapiplugin/Makefile to use only the ppp versions we want
sed -i -e "s:^\(PPPVERSIONS = \).*$:\1${PPPVERSIONS}:g" pppdcapiplugin/Makefile || die "sed failed"
+ # patch capiinit/capiinit.c to look also in /lib/firmware
+ sed -i -e "/\"\/usr\/share\/isdn\"/i\"/lib/firmware\"," capiinit/capiinit.c || die "sed failed"
}
src_compile() {
@@ -66,16 +69,26 @@ src_compile() {
src_install() {
dodir /dev
- emake DESTDIR=${D} install || die "make install failed"
+ make DESTDIR=${D} install || die "make install failed"
# install docs
newdoc rcapid/README README.rcapid
newdoc pppdcapiplugin/README README.pppdcapiplugin
- dodoc scripts/makedev.sh ${MY_FILES}/README.gentoo
+ dodoc scripts/makedev.sh ${FILESDIR}/${PV}/README.gentoo
docinto pppdcapiplugin.examples; dodoc pppdcapiplugin/examples/*
- # install init-script
- newinitd ${FILESDIR}/${PV}/capi.init capi
+ # install init-script + init-config
+ dodir /etc/conf.d # BUG: w/o newconfd failes
+ newinitd ${FILESDIR}/${PV}/capi.initd capi
+ newconfd ${FILESDIR}/${PV}/capi.confd capi
+
+ # install USB hotplug stuff
+ insinto /etc/hotplug/blacklist.d
+ newins ${FILESDIR}/${PV}/capi.blacklist capi
+ insinto /etc/hotplug/usb
+ newins ${FILESDIR}/${PV}/capi.usermap capi.usermap
+ exeinto /etc/hotplug/usb
+ newexe ${FILESDIR}/${PV}/capi.hotplug capi
# example config
insinto /etc
@@ -97,9 +110,9 @@ pkg_postinst() {
einfo ""
einfo "Annotation for active AVM ISDN boards (B1 ISA/PCI, ...):"
einfo "If you run"
- einfo " emerge capi4k-firmware"
- einfo "you will probably find your board's firmware in /usr/share/isdn."
+ einfo " emerge isdn-firmware"
+ einfo "you will probably find your board's firmware in /lib/firmware."
einfo ""
einfo "If you have another active ISDN board, you should create"
- einfo "/usr/share/isdn and copy there your board's firmware."
+ einfo "/lib/firmware and copy there your board's firmware."
}
diff --git a/net-dialup/capi4k-utils/capi4k-utils-20041006.ebuild b/net-dialup/capi4k-utils/capi4k-utils-20041006.ebuild
deleted file mode 100644
index b6b4bc1bbf4e..000000000000
--- a/net-dialup/capi4k-utils/capi4k-utils-20041006.ebuild
+++ /dev/null
@@ -1,81 +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/capi4k-utils/capi4k-utils-20041006.ebuild,v 1.1 2004/10/30 13:13:58 dragonheart Exp $
-
-inherit eutils
-
-YEAR_PV=${PV:0:4}
-MON_PV=${PV:4:2}
-DAY_PV=${PV:6:2}
-
-MY_P=${PN}-${YEAR_PV}-${MON_PV}-${DAY_PV}
-
-S=${WORKDIR}/${PN}
-DESCRIPTION="Capi4Linux Utils"
-SRC_URI="ftp://ftp.in-berlin.de/pub/capi4linux/${MY_P}.tar.gz ftp://ftp.in-berlin.de/pub/capi4linux/OLD/${MY_P}.tar.gz"
-HOMEPAGE="ftp://ftp.in-berlin.de/pub/capi4linux/"
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="~x86"
-IUSE=""
-
-DEPEND="virtual/linux-sources
- dev-lang/perl
- >=sys-apps/sed-4
- virtual/os-headers
- sys-devel/automake
- sys-devel/autoconf
- sys-devel/libtool
- >=sys-apps/sed-4"
-
-RDEPEND=""
-
-src_unpack() {
- unpack ${A}
- cd ${S}
- epatch ${FILESDIR}/${MY_P}.patch || die "patch failed"
- epatch ${FILESDIR}/${MY_P}-fPIC.patch || die "patch failed"
- sed -i -e 's:linux/capi.h>$:linux/compiler.h>\n#include <linux/capi.h>:g' */*.c || die "sed failed"
- sed -i -e "s:^CFLAGS\(.*\)-O2:CFLAGS\1${CFLAGS}:g" */Makefile.am || die "sed failed"
-}
-
-src_compile() {
- # required by fPIC patch
- cd ${S}/capi20 || die
- ebegin "Updating autotools-generated files"
- aclocal -I . || die "aclocal failed"
- automake -a || die "automake failed"
- autoconf || die "autoconf failed"
- libtoolize -f -c || die "libtoolize failed"
- eend $?
- cd ${S} || die
-
- emake subconfig || die
- emake || die
-}
-
-src_install() {
- dodir /dev
- emake DESTDIR=${D} install || die
- rm -rf ${D}/dev
- newdoc rcapid/README README.rcapid
- newdoc pppdcapiplugin/README README.pppdcapiplugin
- docinto examples.pppdcapiplugin; dodoc pppdcapiplugin/examples/*
- newinitd ${FILESDIR}/capi-init-${PV} capi
- insinto /etc
- insopts -m 0600
- doins capiinit/capi.conf
-}
-
-pkg_postinst() {
- einfo "To use isdn4linux with CAPI replace"
- einfo "I4L_MODULE=\"hisax\" with I4L_MODULE=\"capidrv\","
- einfo "start /etc/init.d/capi and load the module"
- einfo "capidrv."
- einfo ""
- einfo "Annotation for active AVM ISDN boards (B1 ISA/PCI, ...):"
- einfo "Please download the latest firmware from"
- einfo "ftp://ftp.in-berlin.de/pub/capi4linux and copy the files "
- einfo "to /usr/lib/isdn and check your /etc/capi.conf file"
- einfo ""
-}
diff --git a/net-dialup/capi4k-utils/files/20041006/README.gentoo b/net-dialup/capi4k-utils/files/20041006/README.gentoo
index dee179dda060..ea1e3a985ca3 100644
--- a/net-dialup/capi4k-utils/files/20041006/README.gentoo
+++ b/net-dialup/capi4k-utils/files/20041006/README.gentoo
@@ -11,7 +11,7 @@ here an example for the AVM B1 PCI card:
First option is the name of the kernel driver, second is the firmware
file which will be uploaded to the card. All firmware files for the
-active AVM controllers can be found in /usr/share/isdn which is the
+active AVM controllers can be found in /lib/firmware which is the
location where all firmware files have to be placed.
The 'cardnr' option can be left '-' if you only have one card.
@@ -29,8 +29,7 @@ So, if all runs smoothly, then fixate it
rc-update add capi boot
You can now install the package net-dialup/isdn4k-utils if you
-want to use all the legacy ISDN apps, such as 'isdnlog'. The
-needed driver is 'capidrv' (instead of 'hisax').
+want to use all the legacy ISDN apps, such as 'isdnlog'.
pppdcapiplugin
@@ -46,4 +45,4 @@ and read the rcapid documentation.
--
-Stefan Briesenick <sbriesen@gmx.de> 2004-11-13
+Stefan Briesenick <sbriesen@gmx.de> 2004-12-20
diff --git a/net-dialup/capi4k-utils/files/20041006/capi.blacklist b/net-dialup/capi4k-utils/files/20041006/capi.blacklist
new file mode 100644
index 000000000000..8b71e804d8e5
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/20041006/capi.blacklist
@@ -0,0 +1,24 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/files/20041006/capi.blacklist,v 1.1 2004/12/23 20:57:46 mrness Exp $
+
+# CAPI USB is handled via /etc/hotplug/usb/capi.usermap
+fcusb
+fcusb2
+fxusb
+fxusb_CZ
+fcdslusb
+bfusb
+
+# CAPI modules are load from /etc/init.d/capi
+b1isa
+b1pci
+b1pcmcia
+c4
+t1isa
+t1pci
+fcpci
+fcclassic
+fcdsl
+fcdsl2
+fcdslsl
diff --git a/net-dialup/capi4k-utils/files/20041006/capi.confd b/net-dialup/capi4k-utils/files/20041006/capi.confd
new file mode 100644
index 000000000000..6215987018d6
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/20041006/capi.confd
@@ -0,0 +1,11 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/files/20041006/capi.confd,v 1.1 2004/12/23 20:57:46 mrness Exp $
+
+# do you want to use USB hotplug?
+# if disabled, you have to configure your device in /etc/capi.conf
+CAPI_HOTPLUG_USB=1
+
+# should via hotplug added cards generate a beep?
+CAPI_HOTPLUG_BEEP=1
+
diff --git a/net-dialup/capi4k-utils/files/20041006/capi.hotplug b/net-dialup/capi4k-utils/files/20041006/capi.hotplug
new file mode 100644
index 000000000000..6577ff818ff2
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/20041006/capi.hotplug
@@ -0,0 +1,95 @@
+#!/bin/bash
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/files/20041006/capi.hotplug,v 1.1 2004/12/23 20:57:46 mrness Exp $
+
+. /etc/conf.d/capi
+
+[ "$CAPI_HOTPLUG_USB" = "0" ] && exit 0
+
+# driver lookup
+cardinfo() { # <driver>
+ /bin/sed 2>/dev/null -n "s:^\([1-9][0-9]*\) \+${1} \+\([^ ]\+\) \+\([^ ]\+\).*:\1 \3 \2:p" /proc/capi/controller
+}
+
+# AVM firmware loader
+avmusb() { # <card> <firmware>
+ /usr/sbin/avmcapictrl load "/lib/firmware/${2}" "${1}"
+}
+
+# normalize and split product code
+# only needed, because coldplug gives other results than hotplug :-/
+IFS="/" read _A _B _C < <(echo "${PRODUCT}")
+read VENDOR DEVID PCLASS < <(/usr/bin/printf "%04x %04x %04x" "0x${_A}" "0x${_B}" "0x${_C}")
+VENDID="${VENDOR}/${DEVID}"
+DEVTMP="${DEVICE##/proc/bus/usb/}"
+USBBUS="${DEVTMP%%/*}"
+USBDEV="${DEVTMP##*/}"
+
+LOCK="/tmp/.capi-usb-${USBBUS}-${USBDEV}"
+LOADER=""
+DRIVER=""
+FIRMWARE=""
+
+# select driver and firmware
+case "${VENDID}" in
+ "057c/0c00") # FRITZCARD!USB
+ DRIVER="fcusb"
+ ;;
+ "057c/1000") # FRITZCARD!USB v2.0
+ LOADER="avmusb"
+ DRIVER="fcusb2"
+ FIRMWARE="fus2base.frm"
+ ;;
+ "057c/1900") # FRITZCARD!USB v2.1
+ LOADER="avmusb"
+ DRIVER="fcusb2"
+ FIRMWARE="fus3base.frm"
+ ;;
+ "057c/2000") # FRITZX!USB
+ DRIVER="fxusb"
+ ;;
+ "057c/2200") # BlueFRITZ!USB
+ DRIVER="bfusb"
+ ;;
+ "057c/2300") # FRITZDSL!USB
+ LOADER="avmusb"
+ DRIVER="fcdslusb"
+ FIRMWARE="fdsubase.frm"
+ ;;
+ "057c/2800") # FRITZX!USB OEM
+ DRIVER="fxusb_CZ"
+ ;;
+ "057c/3500") # FRITZDSL!USB SL
+ LOADER="avmusb"
+ DRIVER="fcdslslusb"
+ FIRMWARE="fdlubase.frm"
+ ;;
+ *) # unknown card
+ echo "unknown USB product: $VENDID"
+ exit 1
+esac
+
+case "$ACTION" in
+ add)
+ /bin/ln 2>/dev/null -s "$$" "$LOCK" || exit 0
+ for MODULE in kernelcapi capi capidrv $DRIVER; do
+ /sbin/modprobe -s $MODULE || exit 1
+ done
+ if [ -n "$LOADER" -a -n "$FIRMWARE" ]; then
+ CNT=0 # wait for udev
+ while [ ! -e /dev/capi20 -a $CNT -lt 10 ]; do
+ sleep 1; : $((CNT++))
+ done
+ read CARD NAME STATUS < <(cardinfo $DRIVER)
+ [ "$STATUS" = "detected" ] && $LOADER $CARD $FIRMWARE
+ fi
+ [ "$CAPI_HOTPLUG_BEEP" = "0" ] || echo -en "\033[10;1200]\a\033[10;262]" > /dev/console
+ /bin/rm -f "$LOCK"
+ ;;
+ remove)
+ /sbin/modprobe -sqr $DRIVER
+ [ "$CAPI_HOTPLUG_BEEP" = "0" ] || echo -en "\033[10;300]\a\033[10;262]" > /dev/console
+ ;;
+esac
+exit 0
diff --git a/net-dialup/capi4k-utils/files/20041006/capi.initd b/net-dialup/capi4k-utils/files/20041006/capi.initd
new file mode 100644
index 000000000000..947556ab4901
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/20041006/capi.initd
@@ -0,0 +1,54 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/files/20041006/capi.initd,v 1.1 2004/12/23 20:57:46 mrness Exp $
+
+opts="start stop info"
+
+depend() {
+ after isapnp
+}
+
+get_modules() {
+ /usr/bin/cut 2>/dev/null -f2 -d' ' /proc/capi/controller
+}
+
+start() {
+ if [ ! -e /etc/capi.conf ] ; then
+ eerror "You're missing /etc/capi.conf (comes with a capi-driver)."
+ eerror "Emerge net-dialup/fcpci if you are having an AVM Fritz!Card PCI"
+ return 1
+ fi
+
+ ebegin "Loading CAPI"
+
+ /usr/sbin/capiinit 2>/dev/null -c /dev/null prepare
+ /sbin/modprobe -s capidrv
+
+ if /usr/sbin/capiinit activate ; then
+ while read INFO; do einfo " $INFO"; done < /proc/capi/controller
+ fi
+
+ eend $?
+}
+
+stop() {
+ local DRIVERS=$(get_modules)
+
+ ebegin "Unloading CAPI"
+
+ /sbin/modprobe -sqr capidrv
+ /usr/sbin/capiinit 2>/dev/null stop
+ for DRV in $DRIVERS; do /sbin/modprobe -sqr $DRV; done
+
+ eend $?
+}
+
+info() {
+ if [ -e /proc/capi/controller ]; then
+ while read INFO; do einfo "$INFO"; done < /proc/capi/controller
+ else
+ eerror "ERROR: CAPI not loaded"
+ return 1
+ fi
+}
diff --git a/net-dialup/capi4k-utils/files/20041006/capi.usermap b/net-dialup/capi4k-utils/files/20041006/capi.usermap
new file mode 100644
index 000000000000..0285836dd726
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/20041006/capi.usermap
@@ -0,0 +1,8 @@
+capi 0x0003 0x057c 0x0c00 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x1000 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x1900 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x2000 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x2200 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x2300 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x2800 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
+capi 0x0003 0x057c 0x3500 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
diff --git a/net-dialup/capi4k-utils/files/capi-init-20040810 b/net-dialup/capi4k-utils/files/capi-init-20040810
deleted file mode 100644
index 1493fa559f77..000000000000
--- a/net-dialup/capi4k-utils/files/capi-init-20040810
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/files/capi-init-20040810,v 1.2 2004/09/27 10:12:53 dragonheart Exp $
-
-depend() {
- after isapnp
-}
-
-start() {
- if [ ! -e /etc/capi.conf ] ; then
- eerror "You're missing /etc/capi.conf (comes with a capi-driver)."
- eerror "Emerge net-dialup/fcpci if you are having an AVM Fritz!Card PCI"
- return 1
- fi
- ebegin "Starting CAPI"
- /sbin/capiinit start
- eend $?
-}
-
-stop() {
- ebegin "Stopping CAPI"
- /sbin/capiinit stop
- eend $?
-}
diff --git a/net-dialup/capi4k-utils/files/capi-init-20041006 b/net-dialup/capi4k-utils/files/capi-init-20041006
deleted file mode 100644
index bfa88b5a3c91..000000000000
--- a/net-dialup/capi4k-utils/files/capi-init-20041006
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/files/capi-init-20041006,v 1.2 2004/10/31 22:30:12 dragonheart Exp $
-
-depend() {
- after isapnp
-}
-
-start() {
- if [ ! -e /etc/capi.conf ] ; then
- eerror "You're missing /etc/capi.conf (comes with a capi-driver)."
- eerror "Emerge net-dialup/fcpci if you are having an AVM Fritz!Card PCI"
- return 1
- fi
- ebegin "Starting CAPI"
- /usr/sbin/capiinit start
- eend $?
-}
-
-stop() {
- ebegin "Stopping CAPI"
- /usr/sbin/capiinit stop
- eend $?
-}
diff --git a/net-dialup/capi4k-utils/files/capi4k-utils-2004-10-06-fPIC.patch b/net-dialup/capi4k-utils/files/capi4k-utils-2004-10-06-fPIC.patch
deleted file mode 100644
index fc34a613e5be..000000000000
--- a/net-dialup/capi4k-utils/files/capi4k-utils-2004-10-06-fPIC.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- capi20/Makefile.am_old 2004-10-30 13:15:45.099518775 +0200
-+++ capi20/Makefile.am 2004-10-30 13:16:13.422481911 +0200
-@@ -14,6 +14,7 @@
-
- libcapi20dyn_a_SOURCES = capidyn.c
- libcapi20dyn_a_CFLAGS = -fPIC
-+CFLAGS = -fPIC
- # libcapi20_la_LIBADD = $(LIBADD_DL)
-
- $(OBJECTS): libtool
diff --git a/net-dialup/capi4k-utils/files/capi4k-utils-2004-10-06.patch b/net-dialup/capi4k-utils/files/capi4k-utils-2004-10-06.patch
deleted file mode 100644
index 7ec19836fe10..000000000000
--- a/net-dialup/capi4k-utils/files/capi4k-utils-2004-10-06.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-diff -Naur capi4k-utils_old/capi20/capiutils.h capi4k-utils/capi20/capiutils.h
---- capi4k-utils_old/capi20/capiutils.h 2004-10-06 17:13:33.000000000 +0200
-+++ capi4k-utils/capi20/capiutils.h 2004-10-14 11:18:07.049529668 +0200
-@@ -918,7 +918,7 @@
- ,_cstruct BChannelinformation
- ,_cstruct Keypadfacility
- ,_cstruct Useruserdata
-- ,_cstruct Facilitydataarra);
-+ ,_cstruct Facilitydataarray);
- unsigned CONNECT_REQ (_cmsg *cmsg, _cword ApplId, _cword Messagenumber
- ,_cdword adr
- ,_cword CIPValue
-diff -Naur capi4k-utils_old/capifax/capi.c capi4k-utils/capifax/capi.c
---- capi4k-utils_old/capifax/capi.c 2004-08-10 14:11:20.000000000 +0200
-+++ capi4k-utils/capifax/capi.c 2004-10-14 11:16:52.699740737 +0200
-@@ -82,7 +82,7 @@
- * of the application
- */
- ALERT_REQ (CMSG, Appl_Id, 0, CONNECT_IND_PLCI(CMSG),
-- NULL, NULL, NULL, NULL, NULL);
-+ NULL, NULL, NULL, NULL);
- /* inform the user application */
- SetState(Connection, D_ConnectPending);
- IncomingCall(Connection, GetCallingPartyNumber (Connection));
-diff -Naur capi4k-utils_old/.config capi4k-utils/.config
---- capi4k-utils_old/.config 1970-01-01 01:00:00.000000000 +0100
-+++ capi4k-utils/.config 2004-02-23 19:29:23.000000000 +0100
-@@ -0,0 +1,11 @@
-+#
-+# Automatically generated by make menuconfig: don't edit
-+#
-+CONFIG_KERNELDIR='/usr/src/linux'
-+CONFIG_BINDIR='/usr/bin'
-+CONFIG_SBINDIR='/usr/sbin'
-+CONFIG_MANDIR='/usr/share/man'
-+CONFIG_AVMCAPICTRL=y
-+CONFIG_CAPIFAX=y
-+CONFIG_RCAPID=y
-+CONFIG_PPPDCAPIPLUGIN=y
-diff -Naur capi4k-utils_old/scripts/autoconf.h capi4k-utils/scripts/autoconf.h
---- capi4k-utils_old/scripts/autoconf.h 1970-01-01 01:00:00.000000000 +0100
-+++ capi4k-utils/scripts/autoconf.h 2004-02-23 19:29:23.000000000 +0100
-@@ -0,0 +1,12 @@
-+/*
-+ * Automatically generated by make menuconfig: don't edit
-+ */
-+#define AUTOCONF_INCLUDED
-+#define CONFIG_KERNELDIR "/usr/src/linux"
-+#define CONFIG_BINDIR "/usr/bin"
-+#define CONFIG_SBINDIR "/usr/sbin"
-+#define CONFIG_MANDIR "/usr/share/man"
-+#define CONFIG_AVMCAPICTRL 1
-+#define CONFIG_CAPIFAX
-+#define CONFIG_RCAPID
-+#define CONFIG_PPPDCAPIPLUGIN 1
diff --git a/net-dialup/capi4k-utils/files/digest-capi4k-utils-20040810 b/net-dialup/capi4k-utils/files/digest-capi4k-utils-20040810
deleted file mode 100644
index 72474d6b07ac..000000000000
--- a/net-dialup/capi4k-utils/files/digest-capi4k-utils-20040810
+++ /dev/null
@@ -1 +0,0 @@
-MD5 29cf523cbe577a71fd41e2bfc68a36ad capi4k-utils-2004-08-10.tar.gz 837463
diff --git a/net-dialup/capi4k-utils/files/digest-capi4k-utils-20041006 b/net-dialup/capi4k-utils/files/digest-capi4k-utils-20041006
deleted file mode 100644
index 63aefc8b31c8..000000000000
--- a/net-dialup/capi4k-utils/files/digest-capi4k-utils-20041006
+++ /dev/null
@@ -1 +0,0 @@
-MD5 54992ff362ca44629fdf59773a6864cd capi4k-utils-2004-10-06.tar.gz 743667
diff --git a/net-dialup/capi4k-utils/files/digest-capi4k-utils-20041006-r2 b/net-dialup/capi4k-utils/files/digest-capi4k-utils-20041006-r4
index 34abafb72602..34abafb72602 100644
--- a/net-dialup/capi4k-utils/files/digest-capi4k-utils-20041006-r2
+++ b/net-dialup/capi4k-utils/files/digest-capi4k-utils-20041006-r4