summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2011-12-31 21:09:18 +0000
committerPacho Ramos <pacho@gentoo.org>2011-12-31 21:09:18 +0000
commit7a5615a7c4f90e8d7c43550062d4a72874ceaf13 (patch)
treef22afdc233eb85b42bc53cfd26ced8e00b0e944a
parentVersion bump. Update to EAPI 4. (diff)
downloadhistorical-7a5615a7c4f90e8d7c43550062d4a72874ceaf13.tar.gz
historical-7a5615a7c4f90e8d7c43550062d4a72874ceaf13.tar.bz2
historical-7a5615a7c4f90e8d7c43550062d4a72874ceaf13.zip
Version bump, remove old.
Package-Manager: portage-2.1.10.44/cvs/Linux x86_64
-rw-r--r--net-wireless/bluez/ChangeLog34
-rw-r--r--net-wireless/bluez/Manifest20
-rw-r--r--net-wireless/bluez/bluez-4.97-r1.ebuild (renamed from net-wireless/bluez/bluez-4.96-r2.ebuild)50
-rw-r--r--net-wireless/bluez/bluez-4.97.ebuild168
-rw-r--r--net-wireless/bluez/files/bluez-4.67-udev.script21
-rw-r--r--net-wireless/bluez/files/rfcomm-conf.d5
-rw-r--r--net-wireless/bluez/files/rfcomm-init.d27
7 files changed, 289 insertions, 36 deletions
diff --git a/net-wireless/bluez/ChangeLog b/net-wireless/bluez/ChangeLog
index af43a863b892..587ddb921367 100644
--- a/net-wireless/bluez/ChangeLog
+++ b/net-wireless/bluez/ChangeLog
@@ -1,6 +1,38 @@
# ChangeLog for net-wireless/bluez
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/ChangeLog,v 1.109 2011/12/24 15:46:40 maksbotan Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/ChangeLog,v 1.110 2011/12/31 21:09:18 pacho Exp $
+
+*bluez-4.97-r1 (31 Dec 2011)
+*bluez-4.97 (31 Dec 2011)
+
+ 31 Dec 2011; Pacho Ramos <pacho@gentoo.org> +files/bluez-4.67-udev.script,
+ -bluez-4.96-r2.ebuild, +bluez-4.97.ebuild, +bluez-4.97-r1.ebuild,
+ +files/rfcomm-conf.d, +files/rfcomm-init.d:
+ Version bump that also includes IMPORTANT changes:
+ - old-daemons were dropped because they are poorly maintained and I am unable
+ to test them. Also have some problems and look to not work at all in default
+ setups (bug #381355 by Agostino Sarubbo and Rafał Mużyło). If you think you
+ still need some of them, please open a new bug report explaining your needs
+ to let us find a replacement or, if none is available, readd only needed old
+ daemons.
+ - 'bluetooth' init.d script has been completely removed as it was only
+ calling "udevadm trigger --subsystem-match=bluetooth --action=add" at startup.
+ This instruction is now called directly by /lib/udev/bluetooth.sh (the one that
+ was previously calling init.d script and causing problems on systemd setups as
+ reported by mgorny and others (bug #396403), this should also solve bug #389531.
+ Due this change, it's possible that you will start to see how your bluetooth
+ device is not properly detected just after booting if not manually running
+ "udevadm trigger --subsystem-match=bluetooth --action=add", if this is your case,
+ please report a bug to readd a bluetooth init.d script for that (even without
+ getting it automatically started by udev to not hurt systemd users).
+ - Because of previous change, 'rfcomm' part of old bluetooth init.d script has been
+ moved to its own script under /etc/init.d and conf.d.
+ - Due bug 392879 (by Otamay) I have rethink the way some plugins were being
+ installed or not to simply always build and install them. This adds no additional
+ dependencies, also simplifies ebuild preventing it from growing forever with a
+ lot of USE flags and, probably the most important one, makes bluez to simply
+ support and work with more devices.
+ Also remove old.
24 Dec 2011; Maxim Koltsov <maksbotan@gentoo.org> bluez-4.96-r2.ebuild:
Make bluez depend on python only when USE=test-programs
diff --git a/net-wireless/bluez/Manifest b/net-wireless/bluez/Manifest
index 30476ad5470b..9c13a0e25d45 100644
--- a/net-wireless/bluez/Manifest
+++ b/net-wireless/bluez/Manifest
@@ -1,15 +1,31 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX bluetooth-conf.d 181 RMD160 287e1806e25a4f74b4a9f6fc401b78dac31d44ee SHA1 595f897553a6e99000b4a4757f8973b9f39ce11d SHA256 63a96c907996158f637abc3202235b81e7c8a998df487b3e83554062433dd2f8
AUX bluetooth-init.d 767 RMD160 7afb50646e359ed1ede5abdc4e5e01319dc9e3c4 SHA1 3685d4dbbf56802cb03a483dad23825968dc57f8 SHA256 38efb9dffaab70477f7525dd6657dffc725c61e29c05b0649e95c31f589b31ce
AUX bluez-4.18-udev.rules 228 RMD160 ab9b4ce8907c62eb9d1f14406cc2ff3f5ec69a19 SHA1 14e652de6cfed28f215727800460e600129007c2 SHA256 7577c2ed295b67f960f17ac65a44889c6536c125b34e33860d6d9f128a59fa82
AUX bluez-4.18-udev.script 752 RMD160 d8f60749dbe497bef7362a4c3f56b2b83ca079cb SHA1 0c39b4b4f4c57fb334daa793f89c0ffac046b956 SHA256 cb41a4eeea5137fb27d82d74f34e5e7dd725ddf8442c39ea623afe0d3c041fcf
+AUX bluez-4.67-udev.script 663 RMD160 324c46add5a485c759fa1a8fcdc658da2e9f69b8 SHA1 8b54b09d3cb6c715204ff58ef2432bbd73032bfe SHA256 9b134049b1c46fc57a497733a8dec8e354bfdc4186152fe739ae18abde702f24
AUX bluez-plugdev.patch 469 RMD160 a70cd0310240491cf14a5a6d7b60e760804e9816 SHA1 b273aac740e7c19aebc441c6c77e0ba8d32f3480 SHA256 ec3f06f24f530574edf5eef308afcf16bb7e0a88336a454a0b24698d2491f5f2
AUX conf.d-dund 96 RMD160 cf0a59a45f6f1bab134e4aab3545a94dfe094ae0 SHA1 c8d3196d8a917ee5240900af8478bb5adc6c7dea SHA256 fcbf3993c373a71e14557ed35854e839fd7ebf3526f753c83cee07194afca64b
AUX conf.d-hidd 89 RMD160 31407e00bcb00eb0b9c1adeb7434a922bfb967e9 SHA1 dc6831fa817c8bd2378830e13bc96d3ff3fdffa2 SHA256 8fc50b8c644e0bc69eacef2a9555118b2f4758aafcb42e8ea3ca1293e8f3a211
AUX init.d-dund 551 RMD160 273a9fb1989b80f12dc9813e9fe9ca42bd010e33 SHA1 51a24ecdf6d973c09553ed525e97e1cad2d6261f SHA256 e4985a2295d1cd2361b4a6a01b2d474820bf66cb1ff9251742d7aacd0fa574aa
AUX init.d-hidd 780 RMD160 46a761ad2e151c2e1d997a9455edf4e3e4d61df0 SHA1 7d2d80a91517d5fa2965c1ac6078d8cc4f382198 SHA256 b1878d70112fd8fa1b851aaa4caa5e2b4efb55bf8e2dda02c014b55ce93adedb
+AUX rfcomm-conf.d 150 RMD160 5b4e24e56ea284f2bc80436a641fec0c6d0a8e84 SHA1 1716708772bf67f7f83ed562c35cc3b12da8073c SHA256 672498957049fd301f9c9c1dc9fa49430e5e6d3c3f1f3cdce80df3af7d425d08
+AUX rfcomm-init.d 668 RMD160 6c4f90ffbb00651fa957b91150c0c0ebb8ad11fb SHA1 93fc518eb512d71625d5d62da65c3b5c3e926401 SHA256 4430703a9bec9a9482416b2d24aa47492264768a0b61356b361bbc8b1229a83e
DIST bluez-4.96.tar.gz 1164913 RMD160 7775a70c5cd86fc418547fae83621dab39196147 SHA1 c9327784cbcf1efc03cc547ceb18de90c8fb4c7c SHA256 c06fd50fd77909cad55e3181a42c6bce7cfcf7abb8cd87871c13d0d70f87fa99
+DIST bluez-4.97.tar.xz 838040 RMD160 b03737dd4f30715b0823862226ffc9cdd226de8c SHA1 0643066fd609cb0cc00e8e757d5e832707e96219 SHA256 7599118d1551ea4a61534d3f3bcbb75b8bccbaf97d7d1e037cfc90cf62aa29c2
DIST oui-20110801.txt.xz 520980 RMD160 2f7c863825fa8ae35d9beebe6bbd49fddd32f32e SHA1 a210a711e4e8046627676e5adf56132c977b663c SHA256 47be96b0e7b4a3235260f94ad77445fbf5226832ede588d9ea67d61759ff32e3
-EBUILD bluez-4.96-r2.ebuild 5017 RMD160 42ee1e6781a16f5f509bfcd7978a9ff3afd153be SHA1 27fbb226d467bf550fcbcea8787bd431a585b525 SHA256 24180df4ce99b6867f28e45894965fb0b8c8f3fa522a4a559695f85c163c9a11
+DIST oui-20111231.txt.xz 540056 RMD160 7ea3ba9ae3ce2e11f3da951799ae3fbfe47c7b1f SHA1 0d79c83b7564f298c8ca55ddd3790359f63d4c73 SHA256 0a141f649cf999e101efc2e36bd876f264d75bb8ebf4d2997153067132f85d17
EBUILD bluez-4.96.ebuild 4830 RMD160 b16236cc76ee923fe5b263c675540fd6ddd4612e SHA1 3a56c6fbe2911b0b02e69c0b808351af3cf2ce8b SHA256 349ad45c64c56b196554ef31b46980914d5ecfb47badadd4e8d27ab1d04e5ccf
-MISC ChangeLog 20147 RMD160 8b99c11b06ccbed0275f6d6aa985251ced9b40b1 SHA1 300157802628981d7c5737315fc4578306f32ad3 SHA256 fcbdb1e307982214c1db50c4308bdb0cda625c3061e87878244d206ae5573007
+EBUILD bluez-4.97-r1.ebuild 4304 RMD160 4751b460f2eb35f5834a340316d462b100154de7 SHA1 e3edc1349218129568052e175b1ab7b7f6c62c1e SHA256 ac0daa0b481b644092bdcdd31de845fc09880c2f8c6fcb52604941ebb1283e3d
+EBUILD bluez-4.97.ebuild 4288 RMD160 37394b6bb702c6e222b54a9b0ec8e4b219154013 SHA1 0a625a81711507b0a59ed7814bd544cf6a220896 SHA256 a95eb2c1ecb06061e59aae3d172c8f436fc0c6a15b0307a3cf6d0b338d48d776
+MISC ChangeLog 22206 RMD160 2eac4ba77614785aa5271ddbc9c71553d5c7d212 SHA1 b781f120eeb71a2b4d7961ebca78e585d40a8d74 SHA256 bf838c11a9e02c5a27fe0acb8b5b7dec71411bcbebd8432da548b87610b84605
MISC metadata.xml 1002 RMD160 39cba3b507b69bcf58bb5561d8d6af1fd4a9aef4 SHA1 b7eaf92005d3a6f1a697f179f87a2b31e52cf50e SHA256 eefe2611dfa35dc04b39e2c7b36d9ebdfb3764bf945249bf994bd20606dfdeef
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.17 (GNU/Linux)
+
+iEYEARECAAYFAk7/egUACgkQCaWpQKGI+9Rc4wCeKD0gYZoXBasyH9JStgClNC7j
+foYAn3QcjcXugcPiX9vKjdYs7tcHUYyB
+=pRhG
+-----END PGP SIGNATURE-----
diff --git a/net-wireless/bluez/bluez-4.96-r2.ebuild b/net-wireless/bluez/bluez-4.97-r1.ebuild
index 2555b5e9437e..cde5b6c24214 100644
--- a/net-wireless/bluez/bluez-4.96-r2.ebuild
+++ b/net-wireless/bluez/bluez-4.97-r1.ebuild
@@ -1,9 +1,8 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/bluez-4.96-r2.ebuild,v 1.2 2011/12/24 15:46:40 maksbotan Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/bluez-4.97-r1.ebuild,v 1.1 2011/12/31 21:09:18 pacho Exp $
EAPI="4"
-
PYTHON_DEPEND="test-programs? 2"
inherit multilib eutils systemd python
@@ -14,14 +13,14 @@ HOMEPAGE="http://www.bluez.org/"
# Because of oui.txt changing from time to time without noticement, we need to supply it
# ourselves instead of using http://standards.ieee.org/regauth/oui/oui.txt directly.
# See bugs #345263 and #349473 for reference.
-OUIDATE="20110801"
-SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.gz
+OUIDATE="20111231"
+SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.xz
http://dev.gentoo.org/~pacho/bluez/oui-${OUIDATE}.txt.xz"
+
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
-
-IUSE="alsa caps +consolekit cups debug gstreamer maemo6 health old-daemons pcmcia pnat test-programs usb"
+IUSE="alsa caps +consolekit cups debug gstreamer pcmcia test-programs usb"
CDEPEND="
>=dev-libs/glib-2.14:2
@@ -41,6 +40,7 @@ CDEPEND="
"
DEPEND="${CDEPEND}
>=dev-util/pkgconfig-0.20
+ >=dev-libs/check-0.9.4
sys-devel/flex
"
RDEPEND="${CDEPEND}
@@ -62,6 +62,7 @@ pkg_setup() {
if ! use consolekit; then
enewgroup plugdev
fi
+
if use test-programs; then
python_pkg_setup
fi
@@ -82,11 +83,11 @@ src_prepare() {
src_configure() {
econf \
+ --enable-hid2hci \
--enable-audio \
--enable-bccmd \
--enable-datafiles \
--enable-dfutool \
- --enable-hid2hci \
--enable-input \
--enable-network \
--enable-serial \
@@ -100,15 +101,13 @@ src_configure() {
$(use_enable cups) \
$(use_enable debug) \
$(use_enable gstreamer) \
- $(use_enable health) \
- $(use_enable maemo6) \
- $(use_enable old-daemons dund) \
- $(use_enable old-daemons hidd) \
- $(use_enable old-daemons pand) \
$(use_enable pcmcia) \
- $(use_enable pnat) \
$(use_enable test-programs test) \
- $(use_enable usb)
+ $(use_enable usb) \
+ --enable-health \
+ --enable-maemo6 \
+ --enable-pnat \
+ --enable-wiimote
}
src_install() {
@@ -129,13 +128,6 @@ src_install() {
cd "${S}"
fi
- if use old-daemons; then
- newconfd "${FILESDIR}/conf.d-hidd" hidd
- newinitd "${FILESDIR}/init.d-hidd" hidd
- newconfd "${FILESDIR}/conf.d-dund" dund
- newinitd "${FILESDIR}/init.d-dund" dund
- fi
-
insinto /etc/bluetooth
doins \
input/input.conf \
@@ -146,16 +138,16 @@ src_install() {
insinto /lib/udev/rules.d/
newins "${FILESDIR}/${PN}-4.18-udev.rules" 70-bluetooth.rules
exeinto /lib/udev/
- newexe "${FILESDIR}/${PN}-4.18-udev.script" bluetooth.sh
+ newexe "${FILESDIR}/${PN}-4.67-udev.script" bluetooth.sh
- newinitd "${FILESDIR}/bluetooth-init.d" bluetooth
- newconfd "${FILESDIR}/bluetooth-conf.d" bluetooth
+ newinitd "${FILESDIR}/rfcomm-init.d" rfcomm
+ newconfd "${FILESDIR}/rfcomm-conf.d" rfcomm
# Install oui.txt as requested in bug #283791 and approved by upstream
insinto /var/lib/misc
newins "${WORKDIR}/oui-${OUIDATE}.txt" oui.txt
- find "${ED}" -name "*.la" -delete
+ find "${D}" -name "*.la" -delete
}
pkg_postinst() {
@@ -165,14 +157,6 @@ pkg_postinst() {
elog "To use dial up networking you must install net-dialup/ppp."
fi
- if use old-daemons; then
- elog "dund and hidd init scripts were installed because you have the old-daemons"
- elog "use flag on. They are not started by default via udev so please add them"
- elog "to the required runlevels using rc-update <runlevel> add <dund/hidd>. If"
- elog "you need init scripts for the other daemons, please file requests"
- elog "to https://bugs.gentoo.org."
- fi
-
if use consolekit; then
elog "If you want to use rfcomm as a normal user, you need to add the user"
elog "to the uucp group."
diff --git a/net-wireless/bluez/bluez-4.97.ebuild b/net-wireless/bluez/bluez-4.97.ebuild
new file mode 100644
index 000000000000..301baf8e04ff
--- /dev/null
+++ b/net-wireless/bluez/bluez-4.97.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/bluez-4.97.ebuild,v 1.1 2011/12/31 21:09:18 pacho Exp $
+
+EAPI="4"
+PYTHON_DEPEND="test-programs? 2"
+
+inherit multilib eutils systemd python
+
+DESCRIPTION="Bluetooth Tools and System Daemons for Linux"
+HOMEPAGE="http://www.bluez.org/"
+
+# Because of oui.txt changing from time to time without noticement, we need to supply it
+# ourselves instead of using http://standards.ieee.org/regauth/oui/oui.txt directly.
+# See bugs #345263 and #349473 for reference.
+OUIDATE="20111231"
+SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.xz
+ http://dev.gentoo.org/~pacho/bluez/oui-${OUIDATE}.txt.xz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86"
+IUSE="alsa caps +consolekit cups debug gstreamer pcmcia test-programs usb"
+
+CDEPEND="
+ >=dev-libs/glib-2.14:2
+ sys-apps/dbus
+ >=sys-fs/udev-146[extras]
+ alsa? (
+ media-libs/alsa-lib[alsa_pcm_plugins_extplug,alsa_pcm_plugins_ioplug]
+ media-libs/libsndfile
+ )
+ caps? ( >=sys-libs/libcap-ng-0.6.2 )
+ cups? ( net-print/cups )
+ gstreamer? (
+ >=media-libs/gstreamer-0.10:0.10
+ >=media-libs/gst-plugins-base-0.10:0.10
+ )
+ usb? ( dev-libs/libusb:1 )
+"
+DEPEND="${CDEPEND}
+ >=dev-util/pkgconfig-0.20
+ >=dev-libs/check-0.9.4
+ sys-devel/flex
+"
+RDEPEND="${CDEPEND}
+ !net-wireless/bluez-libs
+ !net-wireless/bluez-utils
+ consolekit? (
+ || ( sys-auth/consolekit
+ >=sys-apps/systemd-37 )
+ )
+ test-programs? (
+ dev-python/dbus-python
+ dev-python/pygobject:2
+ )
+"
+
+DOCS=( AUTHORS ChangeLog README )
+
+pkg_setup() {
+ if ! use consolekit; then
+ enewgroup plugdev
+ fi
+
+ if use test-programs; then
+ python_pkg_setup
+ fi
+}
+
+src_prepare() {
+ if ! use consolekit; then
+ # No consolekit for at_console etc, so we grant plugdev the rights
+ epatch "${FILESDIR}/bluez-plugdev.patch"
+ fi
+
+ if use cups; then
+ sed -i \
+ -e "s:cupsdir = \$(libdir)/cups:cupsdir = `cups-config --serverbin`:" \
+ Makefile.tools Makefile.in || die
+ fi
+}
+
+src_configure() {
+ econf \
+ --enable-audio \
+ --enable-bccmd \
+ --enable-datafiles \
+ --enable-dfutool \
+ --enable-input \
+ --enable-network \
+ --enable-serial \
+ --enable-service \
+ --enable-tools \
+ --disable-hal \
+ --localstatedir=/var \
+ --with-systemdunitdir="$(systemd_get_unitdir)" \
+ $(use_enable alsa) \
+ $(use_enable caps capng) \
+ $(use_enable cups) \
+ $(use_enable debug) \
+ $(use_enable gstreamer) \
+ $(use_enable pcmcia) \
+ $(use_enable test-programs test) \
+ $(use_enable usb) \
+ --enable-health \
+ --enable-maemo6 \
+ --enable-pnat \
+ --enable-wiimote
+}
+
+src_install() {
+ default
+
+ if use test-programs ; then
+ cd "${S}/test"
+ dobin simple-agent simple-service monitor-bluetooth
+ newbin list-devices list-bluetooth-devices
+ rm test-textfile.{c,o} || die # bug #356529
+ for b in apitest hsmicro hsplay test-* ; do
+ newbin "${b}" "bluez-${b}"
+ done
+ insinto /usr/share/doc/${PF}/test-services
+ doins service-*
+
+ python_convert_shebangs -r 2 "${ED}"
+ cd "${S}"
+ fi
+
+ insinto /etc/bluetooth
+ doins \
+ input/input.conf \
+ audio/audio.conf \
+ network/network.conf \
+ serial/serial.conf
+
+ insinto /lib/udev/rules.d/
+ newins "${FILESDIR}/${PN}-4.18-udev.rules" 70-bluetooth.rules
+ exeinto /lib/udev/
+ newexe "${FILESDIR}/${PN}-4.67-udev.script" bluetooth.sh
+
+ newinitd "${FILESDIR}/rfcomm-init.d" rfcomm
+ newconfd "${FILESDIR}/rfcomm-conf.d" rfcomm
+
+ # Install oui.txt as requested in bug #283791 and approved by upstream
+ insinto /var/lib/misc
+ newins "${WORKDIR}/oui-${OUIDATE}.txt" oui.txt
+
+ find "${D}" -name "*.la" -delete
+}
+
+pkg_postinst() {
+ udevadm control --reload-rules && udevadm trigger --subsystem-match=bluetooth
+
+ if ! has_version "net-dialup/ppp"; then
+ elog "To use dial up networking you must install net-dialup/ppp."
+ fi
+
+ if use consolekit; then
+ elog "If you want to use rfcomm as a normal user, you need to add the user"
+ elog "to the uucp group."
+ else
+ elog "Since you have the consolekit use flag disabled, you will only be able to run"
+ elog "bluetooth clients as root. If you want to be able to run bluetooth clientes as "
+ elog "a regular user, you need to enable the consolekit use flag for this package or"
+ elog "to add the user to the plugdev group."
+ fi
+}
diff --git a/net-wireless/bluez/files/bluez-4.67-udev.script b/net-wireless/bluez/files/bluez-4.67-udev.script
new file mode 100644
index 000000000000..b176611d9d6e
--- /dev/null
+++ b/net-wireless/bluez/files/bluez-4.67-udev.script
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# bluetooth.sh: udev external RUN script
+#
+# Copyright:
+# 2005-2006 Henrik Brix Andersen <brix@gentoo.org>
+# 2007 Petteri Räty <betelgeuse@gentoo.org>
+# 2008 Tiziano Müller <dev-zero@gentoo.org>
+# 2011 Pacho Ramos <pacho@gentoo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+# Find out where sysfs is mounted. Exit if not available
+sysfs=`grep -F sysfs /proc/mounts | awk '{print $2}'`
+if [ "$sysfs" = "" ]; then
+ echo "sysfs is required"
+ exit 1
+fi
+
+if [ ! -d $sysfs/class/bluetooth/hci[0-9]* -a ! -d $sysfs/bus/bluetooth/devices/hci[0-9]* ]; then
+ udevadm trigger --subsystem-match=bluetooth --action=add
+fi
diff --git a/net-wireless/bluez/files/rfcomm-conf.d b/net-wireless/bluez/files/rfcomm-conf.d
new file mode 100644
index 000000000000..d87acdb282eb
--- /dev/null
+++ b/net-wireless/bluez/files/rfcomm-conf.d
@@ -0,0 +1,5 @@
+# Bind rfcomm devices (allowed values are "true" and "false")
+RFCOMM_ENABLE=true
+
+# Config file for rfcomm
+RFCOMM_CONFIG="/etc/bluetooth/rfcomm.conf"
diff --git a/net-wireless/bluez/files/rfcomm-init.d b/net-wireless/bluez/files/rfcomm-init.d
new file mode 100644
index 000000000000..d3b819e1abea
--- /dev/null
+++ b/net-wireless/bluez/files/rfcomm-init.d
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/files/rfcomm-init.d,v 1.1 2011/12/31 21:09:18 pacho Exp $
+
+depend() {
+ after coldplug
+ need dbus localmount hostname
+}
+
+start() {
+ if [ "${RFCOMM_ENABLE}" = "true" -a -x /usr/bin/rfcomm ]; then
+ if [ -f "${RFCOMM_CONFIG}" ]; then
+ ebegin "Starting rfcomm"
+ /usr/bin/rfcomm -f "${RFCOMM_CONFIG}" bind all
+ eend $?
+ else
+ ewarn "Not enabling rfcomm because RFCOMM_CONFIG does not exists"
+ fi
+ fi
+}
+
+stop() {
+ ebegin "Shutting down rfcomm"
+ /usr/bin/rfcomm release all
+ eend $?
+}