summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Tse <liquidx@gentoo.org>2004-09-21 23:09:54 +0000
committerAlastair Tse <liquidx@gentoo.org>2004-09-21 23:09:54 +0000
commit8489fd9e69bf15ff26776a8efd1a849da788d844 (patch)
treebf263402a6c555c8af5ed4b65223d601f07bc773 /net-wireless/bluez-utils
parentpovray-3.50c is now povray-3.5, making sure 3.6.1 > 3.5 that way (Manifest re... (diff)
downloadgentoo-2-8489fd9e69bf15ff26776a8efd1a849da788d844.tar.gz
gentoo-2-8489fd9e69bf15ff26776a8efd1a849da788d844.tar.bz2
gentoo-2-8489fd9e69bf15ff26776a8efd1a849da788d844.zip
many fixes to init scripts, dep updates, etc. (#60403,#56713)
Diffstat (limited to 'net-wireless/bluez-utils')
-rw-r--r--net-wireless/bluez-utils/ChangeLog12
-rw-r--r--net-wireless/bluez-utils/bluez-utils-2.10-r1.ebuild92
-rw-r--r--net-wireless/bluez-utils/files/2.10-r1/bluetooth.rc138
-rw-r--r--net-wireless/bluez-utils/files/2.10-r1/pin1
-rw-r--r--net-wireless/bluez-utils/files/2.10-r1/pin-helper.sh4
-rw-r--r--net-wireless/bluez-utils/files/bluetooth.rc7
-rw-r--r--net-wireless/bluez-utils/files/digest-bluez-utils-2.10-r11
7 files changed, 253 insertions, 2 deletions
diff --git a/net-wireless/bluez-utils/ChangeLog b/net-wireless/bluez-utils/ChangeLog
index be4516dae942..fd9e632acc30 100644
--- a/net-wireless/bluez-utils/ChangeLog
+++ b/net-wireless/bluez-utils/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for net-wireless/bluez-utils
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez-utils/ChangeLog,v 1.27 2004/09/19 15:25:44 puggy Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez-utils/ChangeLog,v 1.28 2004/09/21 23:09:54 liquidx Exp $
+
+*bluez-utils-2.10-r1 (22 Sep 2004)
+
+ 22 Sep 2004; Alastair Tse <liquidx@gentoo.org> files/bluetooth.rc,
+ +files/2.10-r1/bluetooth.rc, +files/2.10-r1/pin,
+ +files/2.10-r1/pin-helper.sh, +bluez-utils-2.10-r1.ebuild:
+ changes to init scripts (added dund,pand support, added conf.d defaults)
+ (#60304) thanks to Florian Ehrenthal, made pin number handling more compliant
+ with upstream (#56173), upped pygtk dep to 2.2 (#56157). versionised
+ init files.
19 Sep 2004; Douglas Russell,,, <puggy@gentoo.org> bluez-utils-2.10.ebuild:
Bumping x86 and ppc stable
diff --git a/net-wireless/bluez-utils/bluez-utils-2.10-r1.ebuild b/net-wireless/bluez-utils/bluez-utils-2.10-r1.ebuild
new file mode 100644
index 000000000000..b74bc020ea6a
--- /dev/null
+++ b/net-wireless/bluez-utils/bluez-utils-2.10-r1.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez-utils/bluez-utils-2.10-r1.ebuild,v 1.1 2004/09/21 23:09:54 liquidx Exp $
+
+inherit eutils
+
+DESCRIPTION="bluetooth utilities"
+HOMEPAGE="http://bluez.sourceforge.net/"
+SRC_URI="http://bluez.sourceforge.net/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~sparc ~ppc ~amd64"
+IUSE="gtk"
+RDEPEND=">=net-wireless/bluez-libs-2.10
+ !net-wireless/bluez-pan
+ gtk? ( >=dev-python/pygtk-2.2 )
+ dev-libs/libusb"
+
+DEPEND="sys-devel/bison
+ sys-devel/flex
+ >=sys-apps/sed-4
+ ${RDEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S};
+
+ # Fix some installation locations
+ for dir in rfcomm sdpd pand hcid dund tools; do
+ mv -f $dir/Makefile.in ${T}/Makefile.in
+ sed -e "s:\$(prefix)/usr/share/man:\@mandir\@:" \
+ ${T}/Makefile.in > $dir/Makefile.in;
+ done
+
+ mv -f hcid/Makefile.in ${T}/Makefile.in
+ sed -e "s:\$(prefix)/etc/bluetooth:/etc/bluetooth:" \
+ ${T}/Makefile.in > hcid/Makefile.in
+
+ if ! use gtk; then
+ mv -f scripts/Makefile.in ${T}/Makefile.in
+ sed -e "s:= bluepin:= :" \
+ ${T}/Makefile.in > scripts/Makefile.in
+ fi
+}
+
+src_compile() {
+ econf || die "econf failed"
+ emake || die
+}
+
+src_install() {
+ make DESTDIR=${D} install || die
+ dodoc README
+
+ sed -e "s:security auto;:security user;:" \
+ -i ${D}/etc/bluetooth/hcid.conf
+
+ if use gtk; then
+ sed -e "s:\(pin_helper \).*:\1/usr/bin/bluepin;:" \
+ -i ${D}/etc/bluetooth/hcid.conf
+ else
+ sed -e "s:\(pin_helper \).*:\1/etc/bluetooth/pin-helper;:" \
+ -i ${D}/etc/bluetooth/hcid.conf
+ fi
+
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/2.10-r1/bluetooth.rc bluetooth
+
+ exeinto /etc/bluetooth
+ newexe ${FILESDIR}/2.10-r1/pin-helper pin-helper
+ insinto /etc/bluetooth
+ newins ${FILESDIR}/2.10-r1/pin pin
+ fperms 0600 /etc/bluetooth/pin
+
+ insinto /etc/conf.d
+ newins ${S}/scripts/bluetooth.default bluetooth
+}
+
+pkg_postinst() {
+ einfo ""
+ einfo "A startup script has been installed in /etc/init.d/bluetooth."
+ einfo "RFComm devices are found in /dev/bluetooth/rfcomm/* instead of /dev/rfcomm*"
+ einfo "If you need to set a default PIN, edit /etc/bluetooth/pin, and change"
+ einfo "/etc/bluetooth/hcid.conf option 'pin_helper' to /etc/bluetooth/pin-helper."
+
+ if use gtk; then
+ einfo "By default, /usr/bin/bluepin will be launched on the desktop display"
+ einfo "for pin number input."
+ fi
+ einfo ""
+}
diff --git a/net-wireless/bluez-utils/files/2.10-r1/bluetooth.rc b/net-wireless/bluez-utils/files/2.10-r1/bluetooth.rc
new file mode 100644
index 000000000000..7a31424fb5fc
--- /dev/null
+++ b/net-wireless/bluez-utils/files/2.10-r1/bluetooth.rc
@@ -0,0 +1,138 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez-utils/files/2.10-r1/bluetooth.rc,v 1.1 2004/09/21 23:09:54 liquidx Exp $
+
+UART_CONF="/etc/bluetooth/uart"
+
+depend() {
+ after hotplug
+}
+
+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 [ "${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 [ "${HID2HCI_ENABLE}" = "true" -a -x /usr/sbin/hid2hci ]; then
+ ebegin " Running hid2hci"
+ /usr/sbin/hid2hci -0 -q #be quiet
+ 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
+}
diff --git a/net-wireless/bluez-utils/files/2.10-r1/pin b/net-wireless/bluez-utils/files/2.10-r1/pin
new file mode 100644
index 000000000000..81c545efebe5
--- /dev/null
+++ b/net-wireless/bluez-utils/files/2.10-r1/pin
@@ -0,0 +1 @@
+1234
diff --git a/net-wireless/bluez-utils/files/2.10-r1/pin-helper.sh b/net-wireless/bluez-utils/files/2.10-r1/pin-helper.sh
new file mode 100644
index 000000000000..b8c05b48b219
--- /dev/null
+++ b/net-wireless/bluez-utils/files/2.10-r1/pin-helper.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+echo -n "PIN:"
+cat /etc/bluetooth/pin
+
diff --git a/net-wireless/bluez-utils/files/bluetooth.rc b/net-wireless/bluez-utils/files/bluetooth.rc
index 20d01c2811fb..04755cb0efeb 100644
--- a/net-wireless/bluez-utils/files/bluetooth.rc
+++ b/net-wireless/bluez-utils/files/bluetooth.rc
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez-utils/files/bluetooth.rc,v 1.4 2004/07/15 00:23:15 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez-utils/files/bluetooth.rc,v 1.5 2004/09/21 23:09:54 liquidx Exp $
UART_CONF="/etc/bluetooth/uart"
@@ -9,6 +9,10 @@ depend() {
after hotplug
}
+start_probe() {
+ /sbin/modprobe bluetooth l2cap rfcomm sdp
+}
+
start_uarts() {
[ -f /usr/sbin/hciattach -a -f ${UART_CONF} ] || return
grep -v '^#' $UART_CONF | while read i; do
@@ -23,6 +27,7 @@ stop_uarts() {
start() {
local RETVAL
ebegin "Starting Bluetooth"
+ start_probe
[ -x /usr/sbin/hcid ] && \
start-stop-daemon --start --quiet --exec /usr/sbin/hcid
RETVAL=$?
diff --git a/net-wireless/bluez-utils/files/digest-bluez-utils-2.10-r1 b/net-wireless/bluez-utils/files/digest-bluez-utils-2.10-r1
new file mode 100644
index 000000000000..9d6edfd94983
--- /dev/null
+++ b/net-wireless/bluez-utils/files/digest-bluez-utils-2.10-r1
@@ -0,0 +1 @@
+MD5 4f936b90e32eb24904dea70bd0a464f0 bluez-utils-2.10.tar.gz 290371