summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-dialup/capi4k-utils/ChangeLog10
-rw-r--r--net-dialup/capi4k-utils/Manifest2
-rw-r--r--net-dialup/capi4k-utils/capi4k-utils-20050322.ebuild113
-rw-r--r--net-dialup/capi4k-utils/files/20041006/capi.init45
-rw-r--r--net-dialup/capi4k-utils/files/README.gentoo48
-rw-r--r--net-dialup/capi4k-utils/files/capi.blacklist24
-rw-r--r--net-dialup/capi4k-utils/files/capi.confd11
-rw-r--r--net-dialup/capi4k-utils/files/capi.hotplug95
-rw-r--r--net-dialup/capi4k-utils/files/capi.initd59
-rw-r--r--net-dialup/capi4k-utils/files/capi.usermap8
-rw-r--r--net-dialup/capi4k-utils/files/config8
-rw-r--r--net-dialup/capi4k-utils/files/digest-capi4k-utils-200503221
-rw-r--r--net-dialup/capi4k-utils/files/rcapid.xinetd13
13 files changed, 391 insertions, 46 deletions
diff --git a/net-dialup/capi4k-utils/ChangeLog b/net-dialup/capi4k-utils/ChangeLog
index 9df7cb5d2b00..fb99c138e4f0 100644
--- a/net-dialup/capi4k-utils/ChangeLog
+++ b/net-dialup/capi4k-utils/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-dialup/capi4k-utils
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/ChangeLog,v 1.27 2005/03/05 13:56:55 genstef Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/ChangeLog,v 1.28 2005/03/29 06:43:28 mrness Exp $
+
+*capi4k-utils-20050322 (29 Mar 2005)
+
+ 29 Mar 2005; Alin Nastac <mrness@gentoo.org> +files/README.gentoo,
+ +files/capi.blacklist, +files/capi.confd, +files/capi.hotplug,
+ +files/capi.initd, +files/capi.usermap, +files/config, +files/rcapid.xinetd,
+ -files/20041006/capi.init, +capi4k-utils-20050322.ebuild:
+ Version bump.
05 Mar 2005; Stefan Schweizer <genstef@gentoo.org>
-capi4k-utils-20041006-r3.ebuild, -capi4k-utils-20041006-r4.ebuild,
diff --git a/net-dialup/capi4k-utils/Manifest b/net-dialup/capi4k-utils/Manifest
index a4b78d61de09..cd7d01c232e3 100644
--- a/net-dialup/capi4k-utils/Manifest
+++ b/net-dialup/capi4k-utils/Manifest
@@ -1,8 +1,10 @@
MD5 4a0bb8a608304da5ee282b438e6d54c2 capi4k-utils-20041006-r5.ebuild 3741
+MD5 615bd7a256d3d37c69ab7767f685f33f capi4k-utils-20050322.ebuild 3748
MD5 f01c98810a8efa5155f642f1345615ea ChangeLog 5167
MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163
MD5 4607b3504bc1d4aa7a97c4913b85d8f3 files/capi.conf 592
MD5 5567e0f076f3d1faafcd0d4fa39a1c4e files/digest-capi4k-utils-20041006-r5 156
+MD5 709e4079ecd09537691845755cb9136d files/digest-capi4k-utils-20050322 75
MD5 e74f9b822b6f485ca6ff834c2699151a files/20041006/README.gentoo 1492
MD5 f9d08e560e844f4556da1f58bb5513b4 files/20041006/capi.init 829
MD5 fb9f9b4003d8d1647e23cf7b329386f6 files/20041006/capi.confd 424
diff --git a/net-dialup/capi4k-utils/capi4k-utils-20050322.ebuild b/net-dialup/capi4k-utils/capi4k-utils-20050322.ebuild
new file mode 100644
index 000000000000..689e03d8cc14
--- /dev/null
+++ b/net-dialup/capi4k-utils/capi4k-utils-20050322.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/capi4k-utils/capi4k-utils-20050322.ebuild,v 1.1 2005/03/29 06:43:28 mrness 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}
+PPPVERSIONS="2.4.2 2.4.3" # versions in portage
+
+DESCRIPTION="CAPI4Linux Utils"
+HOMEPAGE="ftp://ftp.in-berlin.de/pub/capi4linux/"
+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"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc"
+IUSE=""
+
+DEPEND="virtual/linux-sources
+ dev-lang/perl
+ >=sys-apps/sed-4
+ virtual/os-headers
+ sys-devel/automake
+ >=sys-devel/autoconf-2.50
+ sys-devel/libtool"
+RDEPEND=""
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${A} || die "failed to unpack sources"
+ cd ${S}
+ # set our config
+ cp -f ${FILESDIR}/config .config
+ # 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
+ sed -i -e "s:^CFLAGS\(.*\)-O2:CFLAGS\1${CFLAGS}:g" */Makefile.am */Rules.make || die "sed failed"
+ # patch capi20/Makefile.am to use -fPIC for shared library
+ 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() {
+ # required by fPIC patch
+ cd ${S}/capi20 || die "capi20 directory not found"
+ ebegin "Updating autotools-generated files"
+ aclocal -I . || die "aclocal failed"
+ automake -a || die "automake failed"
+ export WANT_AUTOCONF=2.5
+ autoconf || die "autoconf failed"
+ libtoolize -f -c || die "libtoolize failed"
+ eend $?
+ cd ${S}
+
+ emake subconfig || die "make subconfig failed"
+ emake || die "make failed"
+}
+
+src_install() {
+ dodir /dev
+ make DESTDIR=${D} install || die "make install failed"
+
+ # install docs
+ newdoc rcapid/README README.rcapid
+ newdoc pppdcapiplugin/README README.pppdcapiplugin
+ dodoc scripts/makedev.sh ${FILESDIR}/README.gentoo
+ docinto pppdcapiplugin.examples; dodoc pppdcapiplugin/examples/*
+
+ # install init-script + init-config
+ dodir /etc/conf.d # BUG: w/o newconfd failes
+ newinitd ${FILESDIR}/capi.initd capi
+ newconfd ${FILESDIR}/capi.confd capi
+
+ # install USB hotplug stuff
+ insinto /etc/hotplug/blacklist.d
+ newins ${FILESDIR}/capi.blacklist capi
+ insinto /etc/hotplug/usb
+ newins ${FILESDIR}/capi.usermap capi.usermap
+ exeinto /etc/hotplug/usb
+ newexe ${FILESDIR}/capi.hotplug capi
+
+ # example config
+ insinto /etc
+ insopts -m 0600
+ doins ${FILESDIR}/capi.conf
+
+ # rcapid config for xinetd
+ insinto /etc/xinetd.d
+ insopts -m 0644
+ newins ${FILESDIR}/rcapid.xinetd rcapid
+
+ # very useful tool ;-)
+ dobin scripts/isdncause
+}
+
+pkg_postinst() {
+ einfo "Please read the instructions in:"
+ einfo "/usr/share/doc/${PF}/README.gentoo.gz"
+ einfo ""
+ einfo "Annotation for active AVM ISDN boards (B1 ISA/PCI, ...):"
+ einfo "If you run"
+ 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 "/lib/firmware and copy there your board's firmware."
+}
diff --git a/net-dialup/capi4k-utils/files/20041006/capi.init b/net-dialup/capi4k-utils/files/20041006/capi.init
deleted file mode 100644
index b5a98bf13d77..000000000000
--- a/net-dialup/capi4k-utils/files/20041006/capi.init
+++ /dev/null
@@ -1,45 +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/20041006/capi.init,v 1.1 2004/11/13 10:29:19 mrness Exp $
-
-opts="start stop info show"
-
-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 "Loading CAPI"
-
- if /usr/sbin/capiinit start ; then
- /usr/sbin/capiinit status | while read INFO; do
- einfo " $INFO"
- done
- fi
-
- eend $?
-}
-
-stop() {
- ebegin "Unloading CAPI"
-
- /usr/sbin/capiinit stop 2>/dev/null
-
- eend $?
-}
-
-info() {
- /usr/sbin/capiinit status
-}
-
-show() {
- /usr/sbin/capiinit show
-}
-
diff --git a/net-dialup/capi4k-utils/files/README.gentoo b/net-dialup/capi4k-utils/files/README.gentoo
new file mode 100644
index 000000000000..ea1e3a985ca3
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/README.gentoo
@@ -0,0 +1,48 @@
+####################################################################
+# CAPI4Linux / Gentoo usage instructions #
+####################################################################
+
+First edit /etc/capi.conf to match your configuration.
+
+here an example for the AVM B1 PCI card:
+
+ # card file proto io irq mem cardnr options
+ b1pci b1.t4 DSS1 - - - -
+
+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 /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.
+Otherwise fill in the card number you want to assign to this card.
+
+Now you can start the CAPI with
+
+ /etc/init.d/capi start
+
+It should show the loaded drivers/cards after the initialization.
+You can check the CAPI with the 'capiinfo' command.
+
+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'.
+
+
+pppdcapiplugin
+~~~~~~~~~~~~~~
+please read the README and have a look at the examples.
+
+
+rcapid
+~~~~~~
+if you want to use 'rcapid' (remote capi daemon), then install
+sys-apps/xinetd and configure it in /etc/xinetd.d/rcapid
+and read the rcapid documentation.
+
+
+--
+Stefan Briesenick <sbriesen@gmx.de> 2004-12-20
diff --git a/net-dialup/capi4k-utils/files/capi.blacklist b/net-dialup/capi4k-utils/files/capi.blacklist
new file mode 100644
index 000000000000..7ef81d727149
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/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/capi.blacklist,v 1.1 2005/03/29 06:43:28 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/capi.confd b/net-dialup/capi4k-utils/files/capi.confd
new file mode 100644
index 000000000000..73d5f9942513
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/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/capi.confd,v 1.1 2005/03/29 06:43:28 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/capi.hotplug b/net-dialup/capi4k-utils/files/capi.hotplug
new file mode 100644
index 000000000000..9ed7517069ff
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/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/capi.hotplug,v 1.1 2005/03/29 06:43:28 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/capi.initd b/net-dialup/capi4k-utils/files/capi.initd
new file mode 100644
index 000000000000..d263703760b8
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/capi.initd
@@ -0,0 +1,59 @@
+#!/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.initd,v 1.1 2005/03/29 06:43:28 mrness Exp $
+
+opts="start stop info"
+
+depend() {
+ after coldplug 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"
+ ( [ -f /proc/capi/capi20 ] || /sbin/modprobe capi ) && \
+ ( [ -f /proc/capi/capidrv ] || /sbin/modprobe capidrv )
+ eend $? || return 1
+
+ CNT=0 # wait for udev
+ while [ ! -e /dev/capi20 -a $CNT -lt 10 ]; do
+ sleep 1; : $((CNT++))
+ done
+
+ 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 0
+}
+
+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/capi.usermap b/net-dialup/capi4k-utils/files/capi.usermap
new file mode 100644
index 000000000000..0285836dd726
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/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/config b/net-dialup/capi4k-utils/files/config
new file mode 100644
index 000000000000..970991b22951
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/config
@@ -0,0 +1,8 @@
+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 --git a/net-dialup/capi4k-utils/files/digest-capi4k-utils-20050322 b/net-dialup/capi4k-utils/files/digest-capi4k-utils-20050322
new file mode 100644
index 000000000000..2bd55066b133
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/digest-capi4k-utils-20050322
@@ -0,0 +1 @@
+MD5 99fff14616c981ec0d0cf67c1a4ac772 capi4k-utils-2005-03-22.tar.gz 679621
diff --git a/net-dialup/capi4k-utils/files/rcapid.xinetd b/net-dialup/capi4k-utils/files/rcapid.xinetd
new file mode 100644
index 000000000000..01208331873f
--- /dev/null
+++ b/net-dialup/capi4k-utils/files/rcapid.xinetd
@@ -0,0 +1,13 @@
+service rcapid
+{
+ port = 2662
+ socket_type = stream
+ wait = no
+ user = root
+ type = unlisted
+ server = /usr/sbin/rcapid
+ server_args = -l 5
+ log_on_success += USERID
+ log_on_failure += USERID
+ disable = yes
+}