summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Briesenick <sbriesen@gentoo.org>2008-03-22 18:34:11 +0000
committerStefan Briesenick <sbriesen@gentoo.org>2008-03-22 18:34:11 +0000
commit6e70e7d7b3e98e587073f88a523f8083d2a35bd7 (patch)
tree0e90d68eed3ec5f87a940dd8c5d9b71bf1dc46c7 /net-wireless
parentversion bump (diff)
downloadhistorical-6e70e7d7b3e98e587073f88a523f8083d2a35bd7.tar.gz
historical-6e70e7d7b3e98e587073f88a523f8083d2a35bd7.tar.bz2
historical-6e70e7d7b3e98e587073f88a523f8083d2a35bd7.zip
revbump. complete new and shiny init-scripts + udev hotplugging.
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/irda-utils/ChangeLog11
-rw-r--r--net-wireless/irda-utils/Manifest13
-rw-r--r--net-wireless/irda-utils/files/irda-setup.sh68
-rw-r--r--net-wireless/irda-utils/files/irda-usb.rules1
-rw-r--r--net-wireless/irda-utils/files/irda-usb.sh70
-rw-r--r--net-wireless/irda-utils/files/irda-utils-0.9.18-smcinit.diff14
-rw-r--r--net-wireless/irda-utils/files/irda.confd27
-rw-r--r--net-wireless/irda-utils/files/irda.initd71
-rw-r--r--net-wireless/irda-utils/files/irda.modsd46
-rw-r--r--net-wireless/irda-utils/files/irda.rules18
-rw-r--r--net-wireless/irda-utils/irda-utils-0.9.18-r2.ebuild (renamed from net-wireless/irda-utils/irda-utils-0.9.18-r1.ebuild)34
11 files changed, 338 insertions, 35 deletions
diff --git a/net-wireless/irda-utils/ChangeLog b/net-wireless/irda-utils/ChangeLog
index 3b30de08e942..49c02ca498ff 100644
--- a/net-wireless/irda-utils/ChangeLog
+++ b/net-wireless/irda-utils/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-wireless/irda-utils
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/irda-utils/ChangeLog,v 1.24 2008/03/06 21:15:00 sbriesen Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/irda-utils/ChangeLog,v 1.25 2008/03/22 18:34:10 sbriesen Exp $
+
+*irda-utils-0.9.18-r2 (22 Mar 2008)
+
+ 22 Mar 2008; Stefan Briesenick <sbriesen@gentoo.org>
+ +files/irda-utils-0.9.18-smcinit.diff, +files/irda.confd,
+ +files/irda.initd, +files/irda.modsd, +files/irda.rules,
+ +files/irda-setup.sh, -files/irda-usb.rules, files/irda-usb.sh,
+ -irda-utils-0.9.18-r1.ebuild, +irda-utils-0.9.18-r2.ebuild:
+ revbump. complete new and shiny init-scripts + udev hotplugging.
*irda-utils-0.9.18-r1 (06 Mar 2008)
diff --git a/net-wireless/irda-utils/Manifest b/net-wireless/irda-utils/Manifest
index 2d342554e67a..80c7eb23e9b8 100644
--- a/net-wireless/irda-utils/Manifest
+++ b/net-wireless/irda-utils/Manifest
@@ -1,18 +1,23 @@
-AUX irda-usb.rules 51 RMD160 5527564f79f9dc7972de85cd507ef526509e7d49 SHA1 9e50a989d87f74f367637bb06ba1c11177ff9ac3 SHA256 de31cddde14b9e84782109028cca4bfd6dbed570dc6ded580461769b93867e4f
-AUX irda-usb.sh 573 RMD160 6dfbb0d2e99850747a63ae1e47e99f776148cd45 SHA1 367d2588b7576d447e04c0681e4be271e2c5ab06 SHA256 5bdcd178845822c2bf6d9e0ff5cefd2377bbae015a1435dc8ba88a39c960e089
+AUX irda-setup.sh 1638 RMD160 5077d15ac4f9145e62f409d828894c58da353794 SHA1 42617a7f696d13102569804bc6547989acefed78 SHA256 378deb51b9a6321013b57d243ff7b8301078dc7fde2959820bd2d50ef5478076
+AUX irda-usb.sh 1287 RMD160 3296f936476b79819c3d98b57b31518545a394ed SHA1 3e5018aa908bfb6d38979baf7c254241f79a9acd SHA256 3a7189528975249d1701e833f68f301d011150b3b7c0ff1e795bbffc0cf5fecf
AUX irda-utils-0.9.16-irkbd.patch 505 RMD160 0d23d2f5e72500378592fbbafa2582cac58787f7 SHA1 fc4ba50e3fb5e378fdcb64c9c86c44f398436f64 SHA256 1c97c8d5a3e4266a5be4c0da41368b0d8cf43a1645285a85e3f0a7c1744dc6cd
AUX irda-utils-0.9.18-io.h.diff 1604 RMD160 51a71ec4a5388cceb76aeeb24709a39f62e2cb91 SHA1 416b0229a2cc53ef2f030eba1089aac6dd786fec SHA256 41ad319946969d3ef3951894433420203666924d97c50acf571f89bd79adde99
AUX irda-utils-0.9.18-makefile.diff 298 RMD160 daa1b92b0e1db4afd844944dcf6574e677382a07 SHA1 3fe858ead185931a73db6c37f70e98f3061c4b40 SHA256 1ed15399f8b1b8bb92b0c7b7e263030382a8b9b743bcfcaf86e5babdb31c0174
+AUX irda-utils-0.9.18-smcinit.diff 509 RMD160 d5887378dd3e5c051889b67d82e5c998f1132dfe SHA1 90f2ed5ec73c678fcc35f3c6540a7e3959e8d606 SHA256 fb1ee401db2630d24ca263c7f1612db723e6c836616a336d2c5a463130355b68
AUX irda-utils-gcc3.4-fix.patch 400 RMD160 bd8e0fd36370bf01593a7e300625244fdc91a30a SHA1 f31963c39038d37f0141149a1c50c92e2e645302 SHA256 26510de6ac30016a11d67eb2c912d9203828c42257f049bf64b7ca0305dc2326
AUX irda-utils-rh1.patch 444 RMD160 97a24330f9b3c639f9d53ad25008d07b59391af6 SHA1 7fbbb6438b1057eaad65597dff29a1727d09573e SHA256 725cd43b05dfc9f05f49ee8d3a81050d3421639c8440092c4d9bed5de1c31b30
AUX irda.conf 313 RMD160 45626a6869a6e40b5da57b95c5a72b5996cc66eb SHA1 48d2ecf98c3493b658d51192db2855167d330777 SHA256 c5c014af8bef432a6d987c7199d9aaca64fe74941502914fc445aa8f2f2dd4e7
+AUX irda.confd 1082 RMD160 6907ff6b6949e936cfdca06fc9e9530c0f7acc94 SHA1 fee39f1cd33adb9e9ee9f7c4340fbc134aaee27d SHA256 bc02b109411bfe3a6d425489633955e412670e0c60a0eb6e994b578cc904a686
+AUX irda.initd 1742 RMD160 53bb6f5fdaf8d0b493a82737eccaadd181e34615 SHA1 9f8d8806535b329002deb5b85d6cbe816ab6987c SHA256 f73b693f578b9ce75f166cff07c37d06e70c800beea068a8dd386c39121ada22
+AUX irda.modsd 1905 RMD160 f40ba079e3ab629dc0ea83628a438bde547198dd SHA1 11f244bf69592adc6fe2ca0cb259a63e313dad15 SHA256 83ad006b650e0ac3328efd3d4912c04d4ec4ed53a20d33b9169f2ca8a63a5bdd
AUX irda.rc 993 RMD160 efdc4abacb06477ba716be8f5b079a5654bd8e7a SHA1 481afc6158f164106d98fae3a58e66732fbe53dd SHA256 30dddbc86255fc226cf49d6ea7662423654ae500a3a75a8b5e4849f5570ab2ac
+AUX irda.rules 758 RMD160 924db1ae90290525e4a4648ae40624286dcd85fe SHA1 157f85fb87b68db942319a40babec84a8e0da598 SHA256 9b53cab524748619bfb26dc05e31dfbbec267bee71acc9a07114fcbea6496cbb
DIST irda-utils-0.9.16.tar.gz 306262 RMD160 d09da29efa29c9918e52c5c05eeabbdf17f6b259 SHA1 36b10be40a4c0949c6541ce5c1f2782c906eb231 SHA256 09a30fa12d81014b2877e8b5c36f5a341788579669d72f2dec0e29d22efe11e9
DIST irda-utils-0.9.17-pre5.tar.gz 311160 RMD160 b1135acdca77f9012847caa2fb4a44f076ec7bed SHA1 1e31ec99d08f82e493ca5d130ec61cadd8bb74fe SHA256 9193feb5d533d70b8ad01afc5d61673d6697a077da640655286dc3b28249eb84
DIST irda-utils-0.9.18.tar.gz 168390 RMD160 440e5b1e013a639431bc247f0005699edabd3607 SHA1 00cd918e373a1f7735dbf8af3a29ade4564ff763 SHA256 61980551e46b2eaa9e17ad31cbc1a638074611fc33bff34163d10c7a67a9fdc6
EBUILD irda-utils-0.9.16-r1.ebuild 2034 RMD160 faf8118e5f8cc826de19e8167cbd4c8959a16978 SHA1 c834d71658cae4318eba16a359981ff029512e42 SHA256 44f628152e3e345f306657fce77f709a1227be0ad014778a3d4accc1954f9c8c
EBUILD irda-utils-0.9.17_pre5.ebuild 2096 RMD160 2e70c612abaefc6ccadeed8b1e2ca44fc3b3f312 SHA1 e64c0caccb5e548156aeeab010b0fa72995e9f54 SHA256 64f6a423fb8e69b461e283bcac1231dbcce90d3cd4579f9f6b9a5a5c617d2a6d
-EBUILD irda-utils-0.9.18-r1.ebuild 2389 RMD160 cf1eb819dc1a5df1ad73f0992ac10e8b6936f8e8 SHA1 060afd2fcb72b4d616952d00ff614b8d79d72b22 SHA256 17d6071c215941a25ed3f9d4d7b0f7524e766fbd3dd776223bfabc783b62051f
+EBUILD irda-utils-0.9.18-r2.ebuild 2637 RMD160 897eb4514dac065dccb3c0b456012be694e46102 SHA1 421cea52e26098d3ca66d39e9cda9482767f28ca SHA256 b0e639d927adaf388f950040f0fa3162ec04209914bc59049b96d3feafcc34df
EBUILD irda-utils-0.9.18.ebuild 1459 RMD160 174a8319aa39beacce575145524eb9f1098cabed SHA1 6b3e0509029fd5c54fc42ac4deeb21bca407caf2 SHA256 cac3e3ffe426a455d6677d545020cdc76a77785fe4f1ef0398c48d6df6efee37
-MISC ChangeLog 5546 RMD160 fb0afb48ff42e2a6f9340f99c094c65138107451 SHA1 56f99cf9e79bc173e06f4868381222e1eb0aeefb SHA256 fa2cb0cab071f00f75daba143e3a0a1a212073be347efc78abfa3045b063812b
+MISC ChangeLog 5953 RMD160 6006eed9fc2685fe39ab1215e3671d6581031256 SHA1 d0b95d9291fea6d1ebee9ed93aa0b95c9cbd6d3a SHA256 ef68f7c09268d5afa55689b5b0f1926edac6898059e63b917152b93b4301fa3c
MISC metadata.xml 159 RMD160 54af1e9a61e5ed1b49b2bbbf3ef2278999c66b13 SHA1 bce3da4745192397c9a08bdbcf7e4914eac9b77b SHA256 ed3a0d440cfa5672284f4172ebde0ea6506c1a38e9a3ed9f14f3d2c093aac42f
diff --git a/net-wireless/irda-utils/files/irda-setup.sh b/net-wireless/irda-utils/files/irda-setup.sh
new file mode 100644
index 000000000000..ff3e57f9a25d
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-setup.sh
@@ -0,0 +1,68 @@
+#!/bin/sh
+#
+# irda-setup
+#
+# Initialize IrDA devices. Based on an Ubuntu init-script,
+# but adapted to be called directly from udev.
+#
+# params: sir/fir <module> <options>
+
+MODE="${1}"
+shift
+
+SYSFS="/sys"
+RESOURCES="${SYSFS}${DEVPATH}/resources"
+
+# Work out resource ranges, so we know which serial port to work with
+PORTS=$(/bin/sed -n 's/io \(.*\)-.*/\1/p' "${RESOURCES}")
+for PORT in ${PORTS}; do
+ case "${PORT}" in
+ 0x3f8)
+ PORT="/dev/ttyS0"
+ break;;
+ 0x2f8)
+ PORT="/dev/ttyS1"
+ break;;
+ 0x3e8)
+ PORT="/dev/ttyS2"
+ break;;
+ 0x2e8)
+ PORT="/dev/ttyS3"
+ break;;
+ default)
+ PORT="UNKNOWN";;
+ esac
+done
+
+# Handle FIR dongles
+if [ "${MODE}" = "fir" ]; then
+ # The BIOS doesn't always activate the device. Prod it
+ echo disable > "${RESOURCES}"
+ echo activate > "${RESOURCES}"
+
+ UART="unknown";
+ if [ "${PORT}" != "UNKNOWN" ]; then
+ # We should attempt to disable the UART. However, we need to store
+ # it - there's a chance that things could still go horribly wrong
+ UART=$(/bin/setserial ${PORT} | /bin/sed 's/.*UART: \(.*\), Port.*/\1/')
+ /bin/setserial ${PORT} uart none
+ fi
+
+ # Load FIR module
+ /sbin/modprobe -sq "${@}" && exit 0 # OK
+
+ # Try to recover
+ [ "${UART}" != "undefined" ] && /bin/setserial ${PORT} uart ${UART}
+fi
+
+# We'll only have got here if we have SIR or the FIR module has failed
+if [ "${PORT}" != "UNKNOWN" ]; then
+ # The BIOS doesn't always activate the device. Prod it
+ echo disable > "${RESOURCES}"
+ echo activate > "${RESOURCES}"
+
+ # The IRQ is not always set correctly, so try to deal with that
+ /bin/setserial ${PORT} $(/bin/grep -h '^irq ' "${RESOURCES}")
+fi
+
+exit 0 # never fail
diff --git a/net-wireless/irda-utils/files/irda-usb.rules b/net-wireless/irda-utils/files/irda-usb.rules
deleted file mode 100644
index 067e12010c2a..000000000000
--- a/net-wireless/irda-utils/files/irda-usb.rules
+++ /dev/null
@@ -1 +0,0 @@
-KERNEL=="irda[0-9]*", RUN+="/lib/udev/irda-usb.sh"
diff --git a/net-wireless/irda-utils/files/irda-usb.sh b/net-wireless/irda-utils/files/irda-usb.sh
index fdbc4cf46737..d0250eab891f 100644
--- a/net-wireless/irda-utils/files/irda-usb.sh
+++ b/net-wireless/irda-utils/files/irda-usb.sh
@@ -1,26 +1,62 @@
-#!/bin/bash
+#!/bin/sh
+#
+# irda-usb
+#
+# Hotplug IrDA-USB devices. Only USB devices are handled!
+# To initialize normal SIR/FIR dongles, please use /etc/init.d/irda
-# Find out where sysfs is mounted. Exit if not available
-SYSFS=$(/bin/sed -n "s:^[^ ]* \([^ ]\+\) sysfs .*:\1:p" /proc/mounts)
-if [[ -z "${SYSFS}" ]]; then
- echo "sysfs is required"
- exit 1
-fi
+SYSFS="/sys"
+
+checkusb() {
+ # quick check, but not always available
+ [ "${PHYSDEVBUS}" = "usb" ] && return 0
+
+ # alternative check via modalias
+ /bin/grep -q '^usb:' "${SYSFS}${DEVPATH}/device/modalias" 2>/dev/null
+}
+
+checkconfig() {
+ . /etc/conf.d/irda
+
+ if [ "${DISCOVERY}" = "yes" ]; then
+ DISCOVERY="-s"
+ else
+ DISCOVERY=""
+ fi
+
+ NET_IRDA_OPTS=""
+
+ # Set maximum baud rate for IrDA
+ if [ -n "${MAX_BAUD_RATE}" ]; then
+ NET_IRDA_OPTS="${NET_IRDA_OPTS} net.irda.max_baud_rate=${MAX_BAUD_RATE}"
+ fi
+
+ # Disable discovery (enabling is done automatically by irattach)
+ if [ -z "${DISCOVERY}" ]; then
+ NET_IRDA_OPTS="${NET_IRDA_OPTS} net.irda.discovery=0"
+ fi
+}
case "${ACTION}" in
add)
- MODALIAS="${SYSFS}${DEVPATH}/device/modalias"
- if [[ -f "${MODALIAS}" ]]; then
- case $(<"${MODALIAS}") in
- usb:*)
- # attach USB-IrDA interface
- /usr/sbin/irattach ${INTERFACE} -s
- ;;
- esac
- fi
+ # We handle USB only
+ checkusb || exit 0
+
+ # Load config
+ checkconfig
+
+ # Load IrDA modules
+ /sbin/modprobe -sqa ircomm-tty ${LOAD_MODULES}
+
+ # Set IrDA options
+ [ -n "${NET_IRDA_OPTS}" ] && /sbin/sysctl -e -q -w ${NET_IRDA_OPTS}
+
+ # Finally, attach IrDA device
+ /usr/sbin/irattach ${INTERFACE} ${DISCOVERY}
;;
+
remove)
- # unconditionally kill irattach instance
+ # Unconditionally kill irattach instance
/usr/bin/pkill -f "^/usr/sbin/irattach ${INTERFACE} ?"
;;
esac
diff --git a/net-wireless/irda-utils/files/irda-utils-0.9.18-smcinit.diff b/net-wireless/irda-utils/files/irda-utils-0.9.18-smcinit.diff
new file mode 100644
index 000000000000..dd06efec02a8
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-utils-0.9.18-smcinit.diff
@@ -0,0 +1,14 @@
+--- smcinit/smcinit.c.orig 2006-07-11 08:16:06.000000000 +0200
++++ smcinit/smcinit.c 2008-03-22 05:49:38.000000000 +0100
+@@ -292,9 +292,9 @@
+ }
+
+ twobyte = pci_read_word(dev, DID);
+- if ((twobyte != 0x24cc) & (twobyte != 0x248c)) {
++ if ((twobyte != 0x244c) & (twobyte != 0x24cc) & (twobyte != 0x248c)) {
+ fprintf(stderr,
+- "%s IO hub device %x not 82801CAM (0x248c or 0x24cc)\n",
++ "%s IO hub device %x not 82801BAM/82801CAM (0x24cc or 0x244c or 0x248c)\n",
+ PROGNAME, twobyte);
+ return 1;
+ }
diff --git a/net-wireless/irda-utils/files/irda.confd b/net-wireless/irda-utils/files/irda.confd
new file mode 100644
index 000000000000..abe483e70724
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda.confd
@@ -0,0 +1,27 @@
+# Set your startup settings for irattach, the IrDA-daemon, here.
+# please also look at /etc/modprobe.d/irda
+
+# Set discovery mode which usually is a good idea for finding other devices.
+# If set 'yes' or 'no' irattach and sysctl are used to enable and disable
+# discovery mode. By default discover mode is disabled.
+DISCOVERY="yes"
+
+# Set IRDA device to access (e.g. /dev/ttyS1 or irda0). In case of irda0,
+# the proper module for FIR-mode has to be set in /etc/modprobe.d/irda.
+DEVICE="/dev/ttyS1"
+
+# Set dongle type, e.g. none, tekram, esi, actisys, actisys+, ep7211, girbil,
+# litelink, airport, old_belkin, mcp2120, act200l, ma600). You do not need
+# a dongle for FIR mode. See "man 8 irattach" for more information.
+DONGLE="none"
+
+# Set the serial device to quiet with setserial. This is only useful on some
+# machines in FIR-mode, so most people should leave it blank.
+#SETSERIAL="/dev/ttyS1"
+
+# Sets the maximum baud rate for the IrDA serial port.
+# Some devices (e.g. Nokia mobile phones) need this.
+#MAX_BAUD_RATE="115200"
+
+# Load extra modules
+#LOAD_MODULES="irlan irnet"
diff --git a/net-wireless/irda-utils/files/irda.initd b/net-wireless/irda-utils/files/irda.initd
new file mode 100644
index 000000000000..8cbf0664c998
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda.initd
@@ -0,0 +1,71 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/irda-utils/files/irda.initd,v 1.1 2008/03/22 18:34:11 sbriesen Exp $
+
+# Hint: We don't use start-stop-daemon, because pidfile is the same
+# for every irattach instance. So it isn't reliable if we have more
+# than one IrDA device (i.e. with IrDA-USB).
+
+depend() {
+ use serial
+}
+
+checkconfig() {
+ if [ -z "${DEVICE}" ]; then
+ DEVICE="/dev/ttyS1"
+ fi
+
+ if [ -z "${DONGLE}" -o "${DONGLE}" = "none" ]; then
+ DONGLE=""
+ else
+ DONGLE="-d ${DONGLE}"
+ fi
+
+ if [ "${DISCOVERY}" = "yes" ]; then
+ DISCOVERY="-s"
+ else
+ DISCOVERY=""
+ fi
+
+ NET_IRDA_OPTS=""
+
+ # Set maximum baud rate for IrDA
+ if [ -n "${MAX_BAUD_RATE}" ]; then
+ NET_IRDA_OPTS="${NET_IRDA_OPTS} net.irda.max_baud_rate=${MAX_BAUD_RATE}"
+ fi
+
+ # Disable discovery (enabling is done automatically by irattach)
+ if [ -z "${DISCOVERY}" ]; then
+ NET_IRDA_OPTS="${NET_IRDA_OPTS} net.irda.discovery=0"
+ fi
+
+ # Ensure that SIR driver is loaded (needed for pmac_zilog)
+ case "${DEVICE}" in
+ /dev/ttyS*) LOAD_MODULES="${LOAD_MODULES} irtty-sir";;
+ esac
+}
+
+start() {
+ checkconfig
+ ebegin "Starting IrDA"
+
+ # Needed for some machines in FIR-mode
+ [ -n "${SETSERIAL}" ] && /bin/setserial ${SETSERIAL} uart none port 0x0 irq 0
+
+ # Load IrDA modules
+ /sbin/modprobe -sqa ircomm-tty ${LOAD_MODULES}
+
+ # Set IrDA options
+ [ -n "${NET_IRDA_OPTS}" ] && /sbin/sysctl -e -q -w ${NET_IRDA_OPTS}
+
+ # Finally, attach IrDA device
+ /usr/sbin/irattach ${DEVICE} ${DONGLE} ${DISCOVERY}
+ eend ${?}
+}
+
+stop() {
+ ebegin "Shutting down IrDA"
+ /usr/bin/pkill -f "^/usr/sbin/irattach ${DEVICE} ?"
+ eend ${?} || return 0 # never fail
+}
diff --git a/net-wireless/irda-utils/files/irda.modsd b/net-wireless/irda-utils/files/irda.modsd
new file mode 100644
index 000000000000..1641a8bbeec4
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda.modsd
@@ -0,0 +1,46 @@
+# IrDA module configuration
+# please also look at /etc/conf.d/irda
+
+# IrDA over a normal serial port, or a serial port compatible IrDA port
+alias tty-ldisc-11 irtty
+
+# IrCOMM/IrLPT support (virtual serial/parallel over IrDA)
+alias char-major-161 ircomm-tty # Official allocation of IrCOMM
+
+# IrLAN support (Ethernet over IrDA)
+alias irlan0 irlan
+
+# IrNET support (Synchronous PPP over IrDA)
+alias char-major-10-187 irnet # Official allocation of IrNET
+
+# Serial Dongles
+# These values are hard-coded in irattach (not instance order)
+alias irda-dongle-0 tekram # Tekram IrMate IR-210B
+alias irda-dongle-1 esi # ESI JetEye
+alias irda-dongle-2 actisys # Actisys IR-220L
+alias irda-dongle-3 actisys # Actisys IR-220L+
+alias irda-dongle-4 girbil # Greenwich GIrBIL
+alias irda-dongle-5 litelink # Parallax LiteLink (+ modern ESI)
+alias irda-dongle-6 airport # Adaptec Airport 1000 and 2000
+alias irda-dongle-7 old_belkin # Old Belkin (9600 baud only)
+alias irda-dongle-8 ep7211 # ???
+alias irda-dongle-9 mcp2120 # Crystal compatible chipset
+
+# To use the NSC driver on a Thinkpad laptop
+#alias irda0 nsc-ircc
+#options nsc-ircc dongle_id=0x09
+
+# To use the NSC driver on a HP OB6000 laptop
+#alias irda0 nsc-ircc
+#options nsc-ircc dongle_id=0x08
+
+# SMC driver
+#alias irda0 smsc-ircc2
+#options smsc-ircc2 ircc_dma=1 ircc_irq=10 ircc_fir=0x0130 ircc_sir=0x02f8
+
+# Some laptops (Toshiba Satellites and others with SMCS LPC47N227) require
+# running smcinit to initialize the irda device prior to use. If your device
+# is one of them, uncomment the required SMC-IRCC initializer.
+#install smsc-ircc2 /usr/sbin/smcinit && /sbin/modprobe -i smsc-ircc2
+#install smsc-ircc2 /usr/sbin/tosh1800-smcinit && /sbin/modprobe -i smsc-ircc2
+#install smsc-ircc2 /usr/sbin/tosh2450-smcinit && /sbin/modprobe -i smsc-ircc2
diff --git a/net-wireless/irda-utils/files/irda.rules b/net-wireless/irda-utils/files/irda.rules
new file mode 100644
index 000000000000..387fc1a58fc7
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda.rules
@@ -0,0 +1,18 @@
+# IrDA-PNP (autodetect and setup some known SIR/FIR devices)
+# you need to run /etc/init./irda to activate your device
+
+ACTION!="add", GOTO="irda_pnp_end"
+SUBSYSTEM!="pnp", GOTO="irda_pnp_end"
+
+ATTR{id}=="PNP0510", RUN+="/lib/udev/irda-setup sir"
+ATTR{id}=="PNP0511", RUN+="/lib/udev/irda-setup sir"
+ATTR{id}=="NSC*", RUN+="/lib/udev/irda-setup fir nsc-ircc"
+ATTR{id}=="IBM0071", RUN+="/lib/udev/irda-setup fir nsc-ircc dongle_id=0x09"
+ATTR{id}=="SMC*", RUN+="/lib/udev/irda-setup fir smsc-ircc2"
+ATTR{id}=="ALI5123", RUN+="/lib/udev/irda-setup fir ali-ircc"
+ATTR{id}=="VIA3076", RUN+="/lib/udev/irda-setup fir via-ircc"
+
+LABEL="irda_pnp_end"
+
+# IrDA-USB (start irattach automatically)
+KERNEL=="irda[0-9]*", SUBSYSTEM=="net", RUN+="/lib/udev/irda-usb"
diff --git a/net-wireless/irda-utils/irda-utils-0.9.18-r1.ebuild b/net-wireless/irda-utils/irda-utils-0.9.18-r2.ebuild
index f035623e8d8b..dc69ac87eb8c 100644
--- a/net-wireless/irda-utils/irda-utils-0.9.18-r1.ebuild
+++ b/net-wireless/irda-utils/irda-utils-0.9.18-r2.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/irda-utils/irda-utils-0.9.18-r1.ebuild,v 1.1 2008/03/06 21:15:00 sbriesen Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/irda-utils/irda-utils-0.9.18-r2.ebuild,v 1.1 2008/03/22 18:34:10 sbriesen Exp $
inherit eutils toolchain-funcs flag-o-matic
-DESCRIPTION="IrDA utilities for infrared communication"
+DESCRIPTION="IrDA management and handling utilities"
HOMEPAGE="http://irda.sourceforge.net"
SRC_URI="mirror://sourceforge/irda/${P}.tar.gz"
@@ -14,7 +14,10 @@ KEYWORDS="~amd64 ~arm ~ppc ~sh ~x86"
IUSE=""
RDEPEND="=dev-libs/glib-2*
- >=sys-apps/pciutils-2.2.7-r1"
+ >=sys-apps/pciutils-2.2.7-r1
+ sys-process/procps
+ sys-apps/setserial
+ sys-apps/grep"
DEPEND="${RDEPEND}
!app-laptop/smcinit
dev-util/pkgconfig"
@@ -24,8 +27,9 @@ src_unpack() {
cd "${S}"
epatch "${FILESDIR}/irda-utils-rh1.patch"
- epatch "${FILESDIR}/irda-utils-0.9.18-makefile.diff"
- epatch "${FILESDIR}/irda-utils-0.9.18-io.h.diff"
+ epatch "${FILESDIR}/${P}-makefile.diff"
+ epatch "${FILESDIR}/${P}-smcinit.diff"
+ epatch "${FILESDIR}/${P}-io.h.diff"
# fix crosscompile, respect CFLAGS (Bug 200295)
sed -i -e "/^CC/s:gcc:$(tc-getCC):" \
@@ -37,6 +41,9 @@ src_unpack() {
# fix compile when pciutils is compiled with USE=zlib (Bug 200295)
sed -i -e "s:-lpci:$(pkg-config --libs libpci):g" smcinit/Makefile
+ # disable etc subdir in Makefile
+ sed -i -e "s:^\(DIRS.*=.* \)etc \(.*\):\1\2:g" Makefile
+
append-flags "-fno-strict-aliasing"
}
@@ -50,8 +57,7 @@ src_install () {
dodir /usr/sbin
emake install RPM_OPT_FLAGS="${CFLAGS}" ROOT="${D}" \
- MANDIR="${D}/usr/share/man" \
- || die "emake install failed"
+ MANDIR="${D}usr/share/man" || die "emake install failed"
newdoc ethereal/README README.wireshark
newdoc irattach/README README.irattach
@@ -67,13 +73,17 @@ src_install () {
newdoc irdadump/ChangeLog ChangeLog.irdadump
newdoc smcinit/ChangeLog ChangeLog.smcinit
dohtml smcinit/RobMiller-irda.html
- dodoc README etc/modules.conf.irda
+ dodoc README
+
+ newconfd "${FILESDIR}/irda.confd" irda
+ newinitd "${FILESDIR}/irda.initd" irda
- newconfd "${FILESDIR}/irda.conf" irda
- newinitd "${FILESDIR}/irda.rc" irda
+ insinto /etc/modprobe.d
+ newins "${FILESDIR}/irda.modsd" irda
insinto /etc/udev/rules.d
- newins "${FILESDIR}/irda-usb.rules" 53-irda-usb.rules
+ newins "${FILESDIR}/irda.rules" 53-irda.rules
exeinto /lib/udev
- doexe "${FILESDIR}/irda-usb.sh"
+ newexe "${FILESDIR}/irda-setup.sh" irda-setup
+ newexe "${FILESDIR}/irda-usb.sh" irda-usb
}