summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Briesenick <sbriesen@gentoo.org>2008-03-06 21:15:01 +0000
committerStefan Briesenick <sbriesen@gentoo.org>2008-03-06 21:15:01 +0000
commit0781cfbc31c7104a41d156b1220d8105e0dd951c (patch)
tree75c12ca316a2291cbf65c85cf7c2ff2fb880586a /net-wireless
parentwe're going to use _alpha instead of _pre since _pre comes after _beta for th... (diff)
downloadgentoo-2-0781cfbc31c7104a41d156b1220d8105e0dd951c.tar.gz
gentoo-2-0781cfbc31c7104a41d156b1220d8105e0dd951c.tar.bz2
gentoo-2-0781cfbc31c7104a41d156b1220d8105e0dd951c.zip
added dependencies, compile and install smcinit, added more docs, added udev-support for usb-irda dongles, solves bug #200295.
(Portage version: 2.1.4.4)
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/irda-utils/ChangeLog11
-rw-r--r--net-wireless/irda-utils/files/irda-usb.rules1
-rw-r--r--net-wireless/irda-utils/files/irda-usb.sh26
-rw-r--r--net-wireless/irda-utils/irda-utils-0.9.18-r1.ebuild79
4 files changed, 115 insertions, 2 deletions
diff --git a/net-wireless/irda-utils/ChangeLog b/net-wireless/irda-utils/ChangeLog
index fc4807f094a1..3b30de08e942 100644
--- a/net-wireless/irda-utils/ChangeLog
+++ b/net-wireless/irda-utils/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-wireless/irda-utils
-# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/irda-utils/ChangeLog,v 1.23 2007/09/25 15:34:21 hanno Exp $
+# 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 $
+
+*irda-utils-0.9.18-r1 (06 Mar 2008)
+
+ 06 Mar 2008; Stefan Briesenick <sbriesen@gentoo.org>
+ +files/irda-usb.rules, +files/irda-usb.sh, +irda-utils-0.9.18-r1.ebuild:
+ added dependencies, compile and install smcinit, added more docs, added
+ udev-support for usb-irda dongles, solves bug #200295.
*irda-utils-0.9.18 (25 Sep 2007)
diff --git a/net-wireless/irda-utils/files/irda-usb.rules b/net-wireless/irda-utils/files/irda-usb.rules
new file mode 100644
index 000000000000..067e12010c2a
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-usb.rules
@@ -0,0 +1 @@
+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
new file mode 100644
index 000000000000..fdbc4cf46737
--- /dev/null
+++ b/net-wireless/irda-utils/files/irda-usb.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# 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
+
+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
+ ;;
+ remove)
+ # unconditionally kill irattach instance
+ /usr/bin/pkill -f "^/usr/sbin/irattach ${INTERFACE} ?"
+ ;;
+esac
diff --git a/net-wireless/irda-utils/irda-utils-0.9.18-r1.ebuild b/net-wireless/irda-utils/irda-utils-0.9.18-r1.ebuild
new file mode 100644
index 000000000000..f035623e8d8b
--- /dev/null
+++ b/net-wireless/irda-utils/irda-utils-0.9.18-r1.ebuild
@@ -0,0 +1,79 @@
+# 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 $
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="IrDA utilities for infrared communication"
+HOMEPAGE="http://irda.sourceforge.net"
+SRC_URI="mirror://sourceforge/irda/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~sh ~x86"
+IUSE=""
+
+RDEPEND="=dev-libs/glib-2*
+ >=sys-apps/pciutils-2.2.7-r1"
+DEPEND="${RDEPEND}
+ !app-laptop/smcinit
+ dev-util/pkgconfig"
+
+src_unpack() {
+ unpack ${A}
+
+ 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"
+
+ # fix crosscompile, respect CFLAGS (Bug 200295)
+ sed -i -e "/^CC/s:gcc:$(tc-getCC):" \
+ -e "/^LD/s:ld:$(tc-getLD):" \
+ -e "/^AR/s:ar:$(tc-getAR):" \
+ -e "/^RANLIB/s:ranlib:$(tc-getRANLIB):" \
+ -e "/^CFLAGS/s:-O2:${CFLAGS}:" Makefile */Makefile
+
+ # fix compile when pciutils is compiled with USE=zlib (Bug 200295)
+ sed -i -e "s:-lpci:$(pkg-config --libs libpci):g" smcinit/Makefile
+
+ append-flags "-fno-strict-aliasing"
+}
+
+src_compile() {
+ emake RPM_OPT_FLAGS="${CFLAGS}" RPM_BUILD_ROOT="${D}" ROOT="${D}" \
+ || die "emake failed"
+}
+
+src_install () {
+ dodir /usr/bin
+ dodir /usr/sbin
+
+ emake install RPM_OPT_FLAGS="${CFLAGS}" ROOT="${D}" \
+ MANDIR="${D}/usr/share/man" \
+ || die "emake install failed"
+
+ newdoc ethereal/README README.wireshark
+ newdoc irattach/README README.irattach
+ newdoc irdadump/README README.irdadump
+ newdoc irdaping/README README.irdaping
+ newdoc irsockets/README README.irsockets
+ newdoc tekram/README README.tekram
+ newdoc smcinit/README README.smcinit
+ newdoc smcinit/README.Peri README.smcinit.Peri
+ newdoc smcinit/README.Rob README.smcinit.Rob
+ newdoc smcinit/README.Tom README.smcinit.Tom
+ newdoc irattach/ChangeLog ChangeLog.irattach
+ newdoc irdadump/ChangeLog ChangeLog.irdadump
+ newdoc smcinit/ChangeLog ChangeLog.smcinit
+ dohtml smcinit/RobMiller-irda.html
+ dodoc README etc/modules.conf.irda
+
+ newconfd "${FILESDIR}/irda.conf" irda
+ newinitd "${FILESDIR}/irda.rc" irda
+
+ insinto /etc/udev/rules.d
+ newins "${FILESDIR}/irda-usb.rules" 53-irda-usb.rules
+ exeinto /lib/udev
+ doexe "${FILESDIR}/irda-usb.sh"
+}