Lines 7-26
Link Here
|
7 |
inherit autotools multilib eutils |
7 |
inherit autotools multilib eutils |
8 |
|
8 |
|
9 |
DESCRIPTION="Bluetooth Tools and System Daemons for Linux" |
9 |
DESCRIPTION="Bluetooth Tools and System Daemons for Linux" |
10 |
HOMEPAGE="http://bluez.sourceforge.net/" |
10 |
HOMEPAGE="http://www.bluez.org" |
11 |
SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.gz" |
11 |
SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.gz" |
12 |
LICENSE="GPL-2 LGPL-2.1" |
12 |
LICENSE="GPL-2 LGPL-2.1" |
13 |
SLOT="0" |
13 |
SLOT="0" |
14 |
KEYWORDS="amd64 arm ~hppa ~ppc ~ppc64 ~sh ~sparc x86" |
14 |
KEYWORDS="~amd64 ~x86" |
15 |
|
15 |
|
16 |
IUSE="alsa +consolekit cups debug doc gstreamer old-daemons test-programs usb" |
16 |
IUSE="alsa caps +consolekit cups debug gstreamer old-daemons pcmcia test-programs usb" |
17 |
|
17 |
|
18 |
CDEPEND="alsa? ( media-libs/alsa-lib ) |
18 |
CDEPEND="alsa? ( media-libs/alsa-lib ) |
|
|
19 |
caps? ( >=sys-libs/libcap-ng-0.6.2 ) |
20 |
cups? ( net-print/cups ) |
19 |
gstreamer? ( |
21 |
gstreamer? ( |
20 |
>=media-libs/gstreamer-0.10 |
22 |
>=media-libs/gstreamer-0.10 |
21 |
>=media-libs/gst-plugins-base-0.10 ) |
23 |
>=media-libs/gst-plugins-base-0.10 |
|
|
24 |
) |
22 |
usb? ( dev-libs/libusb ) |
25 |
usb? ( dev-libs/libusb ) |
23 |
cups? ( net-print/cups ) |
|
|
24 |
sys-fs/udev |
26 |
sys-fs/udev |
25 |
dev-libs/glib |
27 |
dev-libs/glib |
26 |
sys-apps/dbus |
28 |
sys-apps/dbus |
Lines 28-66
Link Here
|
28 |
>=dev-libs/libnl-1.1 |
30 |
>=dev-libs/libnl-1.1 |
29 |
!net-wireless/bluez-libs |
31 |
!net-wireless/bluez-libs |
30 |
!net-wireless/bluez-utils" |
32 |
!net-wireless/bluez-utils" |
31 |
DEPEND="sys-devel/flex |
33 |
DEPEND="${CDEPEND} |
32 |
>=dev-util/pkgconfig-0.20 |
34 |
dev-util/pkgconfig |
33 |
doc? ( dev-util/gtk-doc ) |
35 |
sys-devel/bison |
34 |
${CDEPEND}" |
36 |
sys-devel/flex" |
35 |
RDEPEND="${CDEPEND} |
37 |
RDEPEND="${CDEPEND} |
36 |
consolekit? ( sys-auth/pambase[consolekit] )" |
38 |
consolekit? ( sys-auth/pambase[consolekit] ) |
|
|
39 |
test-programs? ( |
40 |
dev-python/dbus-python |
41 |
dev-python/pygobject |
42 |
)" |
37 |
|
43 |
|
38 |
src_prepare() { |
44 |
src_prepare() { |
39 |
epatch \ |
|
|
40 |
"${FILESDIR}/4.31-as_needed.patch" \ |
41 |
"${FILESDIR}/4.34-conditional_libsbc.patch" |
42 |
|
43 |
if ! use consolekit; then |
45 |
if ! use consolekit; then |
44 |
# No consolekit for at_console etc, so we grant plugdev the rights |
46 |
# No consolekit for at_console etc, so we grant plugdev the rights |
45 |
epatch "${FILESDIR}/bluez-plugdev.patch" |
47 |
epatch "${FILESDIR}/bluez-plugdev.patch" |
46 |
fi |
48 |
fi |
47 |
|
49 |
|
48 |
if use cups; then |
50 |
if use cups; then |
49 |
epatch "${FILESDIR}/4.18/cups-location.patch" |
51 |
epatch "${FILESDIR}"/4.50-cups-location.patch |
|
|
52 |
eautoreconf |
50 |
fi |
53 |
fi |
51 |
|
|
|
52 |
# needed for both patches |
53 |
eautoreconf |
54 |
} |
54 |
} |
55 |
|
55 |
|
56 |
src_configure() { |
56 |
src_configure() { |
57 |
# the order is the same as ./configure --help |
|
|
58 |
|
59 |
# we don't need the other daemons either with the new |
60 |
# service architechture |
61 |
|
62 |
econf \ |
57 |
econf \ |
63 |
$(use_enable doc gtk-doc) \ |
58 |
$(use_enable caps capng) \ |
64 |
--enable-network \ |
59 |
--enable-network \ |
65 |
--enable-serial \ |
60 |
--enable-serial \ |
66 |
--enable-input \ |
61 |
--enable-input \ |
Lines 72-77
Link Here
|
72 |
--enable-netlink \ |
67 |
--enable-netlink \ |
73 |
--enable-tools \ |
68 |
--enable-tools \ |
74 |
--enable-bccmd \ |
69 |
--enable-bccmd \ |
|
|
70 |
$(use_enable pcmcia) \ |
75 |
--enable-hid2hci \ |
71 |
--enable-hid2hci \ |
76 |
--enable-dfutool \ |
72 |
--enable-dfutool \ |
77 |
$(use_enable old-daemons hidd) \ |
73 |
$(use_enable old-daemons hidd) \ |
Lines 79-97
Link Here
|
79 |
$(use_enable old-daemons dund) \ |
75 |
$(use_enable old-daemons dund) \ |
80 |
$(use_enable cups) \ |
76 |
$(use_enable cups) \ |
81 |
$(use_enable test-programs test) \ |
77 |
$(use_enable test-programs test) \ |
82 |
--enable-manpages \ |
78 |
--enable-udevrules \ |
83 |
--enable-configfiles \ |
79 |
--enable-configfiles \ |
84 |
--disable-initscripts \ |
|
|
85 |
--disable-pcmciarules \ |
86 |
$(use_enable debug) \ |
80 |
$(use_enable debug) \ |
87 |
--localstatedir=/var |
81 |
--localstatedir=/var |
88 |
} |
82 |
} |
89 |
|
83 |
|
90 |
src_install() { |
84 |
src_install() { |
91 |
emake DESTDIR="${D}" install || die "make install failed" |
85 |
emake DESTDIR="${D}" install || die "make install failed" |
92 |
|
|
|
93 |
dodoc AUTHORS ChangeLog README || die |
86 |
dodoc AUTHORS ChangeLog README || die |
94 |
|
87 |
|
|
|
88 |
# don't install useless .la files |
89 |
find "${D}" -type f -name '*.la' -delete || die "failed to remove .la files" |
90 |
|
95 |
if use test-programs ; then |
91 |
if use test-programs ; then |
96 |
cd "${S}/test" |
92 |
cd "${S}/test" |
97 |
dobin simple-agent simple-service monitor-bluetooth |
93 |
dobin simple-agent simple-service monitor-bluetooth |
Lines 101-162
Link Here
|
101 |
done |
97 |
done |
102 |
insinto /usr/share/doc/${PF}/test-services |
98 |
insinto /usr/share/doc/${PF}/test-services |
103 |
doins service-* |
99 |
doins service-* |
104 |
|
|
|
105 |
cd "${S}" |
100 |
cd "${S}" |
106 |
fi |
101 |
fi |
107 |
|
102 |
|
108 |
newinitd "${FILESDIR}/4.18/bluetooth-init.d" bluetooth || die |
|
|
109 |
newconfd "${FILESDIR}/4.18/bluetooth-conf.d" bluetooth || die |
110 |
|
111 |
if use old-daemons; then |
103 |
if use old-daemons; then |
112 |
newconfd "${FILESDIR}/4.18/conf.d-hidd" hidd || die |
104 |
newconfd "${FILESDIR}/4.18/conf.d-hidd" hidd || die |
113 |
newinitd "${FILESDIR}/4.18/init.d-hidd" hidd || die |
105 |
newinitd "${FILESDIR}/4.18/init.d-hidd" hidd || die |
114 |
fi |
106 |
fi |
115 |
|
107 |
|
116 |
# bug #84431 |
108 |
## TODO: use group uucp in new udev rules? |
117 |
insinto /etc/udev/rules.d/ |
|
|
118 |
newins "${FILESDIR}/${PN}-4.18-udev.rules" 70-bluetooth.rules || die |
119 |
newins "${S}/scripts/bluetooth.rules" 70-bluetooth-pcmcia.rules || die |
120 |
|
121 |
exeinto /$(get_libdir)/udev/ |
122 |
newexe "${FILESDIR}/${PN}-4.18-udev.script" bluetooth.sh || die |
123 |
doexe "${S}/scripts/bluetooth_serial" || die |
124 |
|
109 |
|
125 |
insinto /etc/bluetooth |
110 |
insinto /etc/bluetooth |
126 |
doins \ |
111 |
doins \ |
127 |
input/input.conf \ |
112 |
input/input.conf \ |
128 |
audio/audio.conf \ |
113 |
audio/audio.conf \ |
129 |
network/network.conf |
114 |
network/network.conf \ |
|
|
115 |
serial/serial.conf \ |
116 |
|| die |
130 |
} |
117 |
} |
131 |
|
118 |
|
132 |
pkg_postinst() { |
119 |
pkg_postinst() { |
133 |
udevadm control --reload_rules && udevadm trigger |
120 |
udevadm control --reload-rules && udevadm trigger --subsystem-match=bluetooth |
134 |
|
121 |
|
135 |
elog |
|
|
136 |
elog "To use dial up networking you must install net-dialup/ppp." |
122 |
elog "To use dial up networking you must install net-dialup/ppp." |
137 |
elog "" |
123 |
elog |
138 |
elog "Since 3.0 bluez has changed the passkey handling to use a dbus based" |
|
|
139 |
elog "API so please remember to update your /etc/bluetooth/hcid.conf." |
140 |
elog "For a password agent, there are for example net-wireless/bluez-gnome" |
124 |
elog "For a password agent, there are for example net-wireless/bluez-gnome" |
141 |
elog "and net-wireless/gnome-bluetooth:2 for GNOME. For KDE, see bug 246381" |
125 |
elog "and net-wireless/gnome-bluetooth:2 for GNOME; for KDE4 instead you can" |
142 |
elog "" |
126 |
elog "install net-wireless/kbluetooth." |
143 |
elog "Since 3.10.1 we don't install the old style daemons any more but rely" |
127 |
elog |
144 |
elog "on the new service architechture:" |
128 |
elog "If you want to use rfcomm as a normal user, you need to add the user" |
145 |
elog " http://wiki.bluez.org/wiki/Services" |
129 |
elog "to the uucp group." |
146 |
elog "" |
130 |
elog |
147 |
elog "3.15 adds support for the audio service. See" |
|
|
148 |
elog "http://wiki.bluez.org/wiki/HOWTO/AudioDevices for configuration help." |
149 |
elog "" |
150 |
elog "Use the old-daemons use flag to get the old daemons like hidd" |
131 |
elog "Use the old-daemons use flag to get the old daemons like hidd" |
151 |
elog "installed. Please note that the init script doesn't stop the old" |
132 |
elog "installed. Please note that the init script doesn't stop the old" |
152 |
elog "daemons after you update it so it's recommended to run:" |
133 |
elog "daemons after you update it so it's recommended to run:" |
153 |
elog " /etc/init.d/bluetooth stop" |
134 |
elog " /etc/init.d/bluetooth stop" |
154 |
elog "before updating your configuration files or you can manually kill" |
135 |
elog "before updating your configuration files or you can manually kill" |
155 |
elog "the extra daemons you previously enabled in /etc/conf.d/bluetooth." |
136 |
elog "the extra daemons you previously enabled in /etc/conf.d/bluetooth." |
156 |
elog "" |
137 |
elog |
157 |
elog "If you want to use rfcomm as a normal user, you need to add the user" |
|
|
158 |
elog "to the uucp group." |
159 |
elog "" |
160 |
if use old-daemons; then |
138 |
if use old-daemons; then |
161 |
elog "The hidd init script was installed because you have the old-daemons" |
139 |
elog "The hidd init script was installed because you have the old-daemons" |
162 |
elog "use flag on. It is not started by default via udev so please add it" |
140 |
elog "use flag on. It is not started by default via udev so please add it" |
Lines 167-173
Link Here
|
167 |
elog "The bluetooth service should be started automatically by udev" |
145 |
elog "The bluetooth service should be started automatically by udev" |
168 |
elog "when the required hardware is inserted next time." |
146 |
elog "when the required hardware is inserted next time." |
169 |
fi |
147 |
fi |
170 |
elog |
|
|
171 |
ewarn "On first install you need to run /etc/init.d/dbus reload or hcid" |
172 |
ewarn "will fail to start." |
173 |
} |
148 |
} |