diff options
author | Petteri Räty <betelgeuse@gentoo.org> | 2007-05-12 14:49:27 +0000 |
---|---|---|
committer | Petteri Räty <betelgeuse@gentoo.org> | 2007-05-12 14:49:27 +0000 |
commit | 559615903ede9e98ee9e1ed32dbb3c357ac893cb (patch) | |
tree | f08543ce480503853611e0c004323d4b9825f5fd /net-wireless/bluez-utils | |
parent | remove old (diff) | |
download | gentoo-2-559615903ede9e98ee9e1ed32dbb3c357ac893cb.tar.gz gentoo-2-559615903ede9e98ee9e1ed32dbb3c357ac893cb.tar.bz2 gentoo-2-559615903ede9e98ee9e1ed32dbb3c357ac893cb.zip |
Change init script to have use dbus instead of after dbus as hcid doesn't work without dbus running. Fixes bug #178158.
(Portage version: 2.1.2.7)
Diffstat (limited to 'net-wireless/bluez-utils')
-rw-r--r-- | net-wireless/bluez-utils/ChangeLog | 9 | ||||
-rw-r--r-- | net-wireless/bluez-utils/bluez-utils-3.10-r1.ebuild | 95 | ||||
-rw-r--r-- | net-wireless/bluez-utils/files/bluez-utils-3.10-init.d | 141 | ||||
-rw-r--r-- | net-wireless/bluez-utils/files/digest-bluez-utils-3.10-r1 | 3 |
4 files changed, 247 insertions, 1 deletions
diff --git a/net-wireless/bluez-utils/ChangeLog b/net-wireless/bluez-utils/ChangeLog index 2e8f531fc7fd..1b8c644c47e0 100644 --- a/net-wireless/bluez-utils/ChangeLog +++ b/net-wireless/bluez-utils/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-wireless/bluez-utils # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez-utils/ChangeLog,v 1.88 2007/05/11 21:10:20 gustavoz Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez-utils/ChangeLog,v 1.89 2007/05/12 14:49:27 betelgeuse Exp $ + +*bluez-utils-3.10-r1 (12 May 2007) + + 12 May 2007; Petteri Räty <betelgeuse@gentoo.org> + +files/bluez-utils-3.10-init.d, +bluez-utils-3.10-r1.ebuild: + Change init script to have use dbus instead of after dbus as hcid doesn't + work without dbus running. Fixes bug #178158. 11 May 2007; Gustavo Zacarias <gustavoz@gentoo.org> bluez-utils-3.10.ebuild: diff --git a/net-wireless/bluez-utils/bluez-utils-3.10-r1.ebuild b/net-wireless/bluez-utils/bluez-utils-3.10-r1.ebuild new file mode 100644 index 000000000000..7a034008a174 --- /dev/null +++ b/net-wireless/bluez-utils/bluez-utils-3.10-r1.ebuild @@ -0,0 +1,95 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez-utils/bluez-utils-3.10-r1.ebuild,v 1.1 2007/05/12 14:49:27 betelgeuse Exp $ + +inherit eutils + +DESCRIPTION="Bluetooth Tools and System Daemons for Linux" +HOMEPAGE="http://bluez.sourceforge.net/" +SRC_URI="http://bluez.sourceforge.net/download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86" + +IUSE="alsa debug hal usb cups" + +DEPEND="app-pda/libopensync + >=net-wireless/bluez-libs-3.10 + hal? ( sys-apps/hal ) + usb? ( dev-libs/libusb ) + cups? ( net-print/cups ) + sys-fs/udev + dev-libs/glib + sys-apps/dbus" + +src_unpack() { + unpack ${A} + # bundled glib + cd "${S}" + rm -r eglib/{*.c,*.h} || die +} + +src_compile() { + econf \ + $(use_enable alsa audio) \ + $(use_enable alsa) \ + $(use_enable debug) \ + $(use_enable usb) \ + $(use_enable cups) \ + $(use_enable hal) \ + --enable-glib \ + --enable-inotify \ + --enable-obex \ + --enable-input \ + --enable-sync \ + --enable-hcid \ + --enable-sdpd \ + --enable-hidd \ + --enable-configfiles \ + --disable-initscripts \ + --enable-pcmciarules \ + --enable-bccmd \ + --enable-avctrl \ + --enable-hid2hci \ + --enable-dfutool \ + --localstatedir=/var \ + || die "econf failed" + + emake || die "emake failed" +} + +src_install() { + make DESTDIR="${D}" install || die "make install failed" + + dodoc AUTHORS ChangeLog README || die + + # optional bluetooth utils + dosbin tools/hcisecfilter tools/ppporc + dobin daemon/passkey-agent + + newinitd "${FILESDIR}/${PN}-3.10-init.d" bluetooth || die + newconfd "${S}/scripts/bluetooth.default" bluetooth || die + + # bug #84431 + insinto /etc/udev/rules.d/ + newins "${FILESDIR}/${PN}-2.24-udev.rules" 70-bluetooth.rules + + exeinto /lib/udev/ + newexe "${FILESDIR}/${PN}-2.24-udev.script" bluetooth.sh +} + +pkg_postinst() { + udevcontrol reload_rules && udevtrigger + + elog "If you use hidd, add --encrypt to the HIDD_OPTIONS in" + elog "/etc/conf.d/bluetooth to secure your connection" + elog + elog "To use dund you must install net-dialup/ppp" + elog "" + elog "Since 3.0 bluez has changed the passkey handling to use a dbus based" + elog "API so please remember to update your /etc/bluetooth/hcid.conf." + elog "For a password asking program, there is for example" + elog "net-wireless/bluez-gnome for gnome and net-wireless/kdebluetooth" + elog "for kde." +} diff --git a/net-wireless/bluez-utils/files/bluez-utils-3.10-init.d b/net-wireless/bluez-utils/files/bluez-utils-3.10-init.d new file mode 100644 index 000000000000..d0f967187f9e --- /dev/null +++ b/net-wireless/bluez-utils/files/bluez-utils-3.10-init.d @@ -0,0 +1,141 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez-utils/files/bluez-utils-3.10-init.d,v 1.1 2007/05/12 14:49:27 betelgeuse Exp $ + +UART_CONF="/etc/bluetooth/uart" + +depend() { + after coldplug + use dbus +} + +start_uarts() { + [ -f /usr/sbin/hciattach -a -f ${UART_CONF} ] || return + grep -v '^#' ${UART_CONF} | while read i; do + /usr/sbin/hciattach $i + done +} + +stop_uarts() { + killall hciattach > /dev/null 2>&1 +} + +start() { + ebegin "Starting Bluetooth" + + if [ "${HID2HCI_ENABLE}" = "true" -a -x /usr/sbin/hid2hci ]; then + ebegin " Running hid2hci" + /usr/sbin/hid2hci -0 -q #be quiet + /bin/sleep 1 # delay for hid's to be detected by hotplug + eend $? + fi + + if [ "${HCID_ENABLE}" = "true" -a -x /usr/sbin/hcid ]; then + if [ -f "${HCID_CONFIG}" ]; then + ebegin " Starting hcid" + start-stop-daemon --start --quiet \ + --exec /usr/sbin/hcid -- -f $HCID_CONFIG + eend $? + else + ewarn "Not enabling hcid because HCID_CONFIG is missing." + fi + fi + + if [ "${SDPD_ENABLE}" = "true" -a -x /usr/sbin/sdpd ]; then + ebegin " Starting sdpd" + start-stop-daemon --start --quiet --exec /usr/sbin/sdpd + eend $? + fi + + if [ "${HIDD_ENABLE}" = "true" -a -x /usr/bin/hidd ]; then + ebegin " Starting hidd" + start-stop-daemon --start --quiet \ + --exec /usr/bin/hidd -- ${HIDD_OPTIONS} --server + eend $? + fi + + 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 + + if [ "${DUND_ENABLE}" = "true" -a -x /usr/bin/dund ]; then + if [ -n "${DUND_OPTIONS}" ]; then + ebegin " Starting dund" + start-stop-daemon --start --quiet \ + --exec /usr/bin/dund -- ${DUND_OPTIONS} + eend $? + else + ewarn "Not starting dund because DUND_OPTIONS not defined." + fi + fi + + if [ "${PAND_ENABLE}" = "true" -a -x /usr/bin/pand ]; then + if [ -n "${PAND_OPTIONS}" ]; then + ebegin " Starting pand" + start-stop-daemon --start --quiet \ + --exec /usr/bin/pand -- ${PAND_OPTIONS} + eend $? + else + ewarn "Not starting pand because PAND_OPTIONS not defined." + fi + fi + + start_uarts + eend 0 +} + +stop() { + ebegin "Shutting down Bluetooth" + + if [ "${PAND_ENABLE}" = "true" -a -x /usr/bin/pand ]; then + ebegin " Stopping pand" + start-stop-daemon --stop --quiet --exec /usr/bin/pand + eend $? + fi + + if [ "${DUND_ENABLE}" = "true" -a -x /usr/bin/dund ]; then + ebegin " Stopping dund" + start-stop-daemon --stop --quiet --exec /usr/bin/dund + eend $? + fi + + if [ "${RFCOMM_ENABLE}" = "true" -a -x /usr/bin/rfcomm ]; then + ebegin " Stopping rfcomm" + /usr/bin/rfcomm release all + eend $? + fi + + if [ "${HIDD_ENABLE}" = "true" -a -x /usr/bin/hidd ]; then + ebegin " Stopping hidd" + start-stop-daemon --stop --quiet --exec /usr/bin/hidd + eend $? + fi + + + if [ "${SDPD_ENABLE}" = "true" -a -x /usr/sbin/sdpd ]; then + ebegin " Stopping sdpd" + start-stop-daemon --stop --quiet --exec /usr/sbin/sdpd + eend $? + fi + + if [ "${HCID_ENABLE}" = "true" -a -x /usr/sbin/hcid ]; then + ebegin " Stopping hcid" + start-stop-daemon --stop --quiet --exec /usr/sbin/hcid + eend $? + fi + + stop_uarts + eend 0 +} + +restart() { + svc_stop + svc_start +} diff --git a/net-wireless/bluez-utils/files/digest-bluez-utils-3.10-r1 b/net-wireless/bluez-utils/files/digest-bluez-utils-3.10-r1 new file mode 100644 index 000000000000..1f2a8007cdfe --- /dev/null +++ b/net-wireless/bluez-utils/files/digest-bluez-utils-3.10-r1 @@ -0,0 +1,3 @@ +MD5 8ad55638a65cb483cbe2717ef3ea7a01 bluez-utils-3.10.tar.gz 802676 +RMD160 12a0d419535a20be5df5afb65134b13a196bc962 bluez-utils-3.10.tar.gz 802676 +SHA256 37c02eeb26cf59e9252e423c9326beaaff61f25bc5186b7f5ce3faacd6a8bc89 bluez-utils-3.10.tar.gz 802676 |