Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 250909 | Differences between
and this patch

Collapse All | Expand All

(-)./net-wireless/bluez/bluez-4.26.ebuild (+157 lines)
Line 0 Link Here
1
# Copyright 1999-2008 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/net-wireless/bluez/bluez-4.21.ebuild,v 1.1 2008/12/04 10:04:22 dev-zero Exp $
4
5
inherit autotools multilib eutils
6
7
DESCRIPTION="Bluetooth Tools and System Daemons for Linux"
8
HOMEPAGE="http://bluez.sourceforge.net/"
9
SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.gz"
10
LICENSE="GPL-2 LGPL-2.1"
11
SLOT="0"
12
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~sh ~sparc ~x86"
13
14
IUSE="alsa cups debug doc examples gstreamer old-daemons test-programs usb"
15
16
RDEPEND="alsa? ( media-libs/alsa-lib )
17
	gstreamer? (
18
		>=media-libs/gstreamer-0.10
19
		>=media-libs/gst-plugins-base-0.10 )
20
	usb? ( dev-libs/libusb )
21
	cups? ( net-print/cups )
22
	sys-fs/udev
23
	dev-libs/glib
24
	sys-apps/dbus
25
	!net-wireless/bluez-libs
26
	!net-wireless/bluez-utils"
27
DEPEND="!<dev-libs/libnl-1.1
28
	sys-devel/flex
29
	dev-util/pkgconfig
30
	doc? ( dev-util/gtk-doc )
31
	${RDEPEND}"
32
33
src_unpack() {
34
	unpack ${A}
35
	cd "${S}"
36
37
	if use cups; then
38
		epatch "${FILESDIR}/4.18/cups-location.patch"
39
		eautoreconf
40
	fi
41
}
42
43
src_compile() {
44
	# the order is the same as ./configure --help
45
46
	# we don't need the other daemons either with the new
47
	# service architechture
48
49
	econf \
50
		$(use_enable doc gtk-doc) \
51
		--enable-network \
52
		--enable-serial \
53
		--enable-input \
54
		--enable-audio \
55
		--enable-service \
56
		$(use_enable gstreamer) \
57
		$(use_enable alsa) \
58
		$(use_enable usb) \
59
		--enable-netlink \
60
		--enable-tools \
61
		--enable-bccmd \
62
		--enable-hid2hci \
63
		--enable-dfutool \
64
		$(use_enable old-daemons hidd) \
65
		$(use_enable old-daemons pand) \
66
		$(use_enable old-daemons dund) \
67
		$(use_enable cups) \
68
		$(use_enable test-programs test) \
69
		--enable-manpages \
70
		--enable-configfiles \
71
		--disable-initscripts \
72
		--disable-pcmciarules \
73
		$(use_enable debug) \
74
		--localstatedir=/var
75
76
	emake || die "emake failed"
77
}
78
79
src_install() {
80
	emake DESTDIR="${D}" install || die "make install failed"
81
82
	dodoc AUTHORS ChangeLog README || die
83
84
	if use test-programs ; then
85
		dobin input/test-input || die
86
87
		# a very simple example daemon
88
		dobin test/passkey-agent || die
89
		dobin test/auth-agent || die
90
	fi
91
92
	newinitd "${FILESDIR}/4.18/bluetooth-init.d" bluetooth || die
93
	newconfd "${FILESDIR}/4.18/bluetooth-conf.d" bluetooth || die
94
95
	if use old-daemons; then
96
		newconfd "${FILESDIR}/4.18/conf.d-hidd" hidd || die
97
		newinitd "${FILESDIR}/4.18/init.d-hidd" hidd || die
98
	fi
99
100
	# bug #84431
101
	insinto /etc/udev/rules.d/
102
	newins "${FILESDIR}/${PN}-4.18-udev.rules" 70-bluetooth.rules || die
103
	newins "${S}/scripts/bluetooth.rules" 70-bluetooth-pcmcia.rules || die
104
105
	exeinto /$(get_libdir)/udev/
106
	newexe "${FILESDIR}/${PN}-4.18-udev.script" bluetooth.sh || die
107
	doexe  "${S}/scripts/bluetooth_serial" || die
108
109
	insinto /etc/bluetooth
110
	doins \
111
		input/input.conf \
112
		audio/audio.conf \
113
		network/network.conf
114
}
115
116
pkg_postinst() {
117
	udevadm control --reload_rules && udevadm trigger
118
119
	elog
120
	elog "To use dial up networking you must install net-dialup/ppp."
121
	elog ""
122
	elog "Since 3.0 bluez has changed the passkey handling to use a dbus based"
123
	elog "API so please remember to update your /etc/bluetooth/hcid.conf."
124
	elog "For a password agent, there is for example net-wireless/bluez-gnome"
125
	elog "for gnome and net-wireless/kdebluetooth for kde."
126
	elog ""
127
	elog "Since 3.10.1 we don't install the old style daemons any more but rely"
128
	elog "on the new service architechture:"
129
	elog "	http://wiki.bluez.org/wiki/Services"
130
	elog ""
131
	elog "3.15 adds support for the audio service. See"
132
	elog "http://wiki.bluez.org/wiki/HOWTO/AudioDevices for configuration help."
133
	elog ""
134
	elog "Use the old-daemons use flag to get the old daemons like hidd"
135
	elog "installed. Please note that the init script doesn't stop the old"
136
	elog "daemons after you update it so it's recommended to run:"
137
	elog "  /etc/init.d/bluetooth stop"
138
	elog "before updating your configuration files or you can manually kill"
139
	elog "the extra daemons you previously enabled in /etc/conf.d/bluetooth."
140
	elog ""
141
	elog "If you want to use rfcomm as a normal user, you need to add the user"
142
	elog "to the uucp group."
143
	elog ""
144
	if use old-daemons; then
145
		elog "The hidd init script was installed because you have the old-daemons"
146
		elog "use flag on. It is not started by default via udev so please add it"
147
		elog "to the required runleves using rc-update <runlevel> add hidd. If"
148
		elog "you need init scripts for the other daemons, please file requests"
149
		elog "to https://bugs.gentoo.org."
150
	else
151
		elog "The bluetooth service should be started automatically by udev"
152
		elog "when the required hardware is inserted next time."
153
	fi
154
	elog
155
	ewarn "On first install you need to run /etc/init.d/dbus reload or hcid"
156
	ewarn "will fail to start."
157
}

Return to bug 250909