summaryrefslogtreecommitdiff
blob: 9d1cb33f6bd9ce19caa2d18633b88acb05a8d9fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# 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.ebuild,v 1.1 2007/05/11 16:02:59 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 ~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}-2.25-init.d" bluetooth
	newconfd "${S}/scripts/bluetooth.default" bluetooth

	# 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."
}