/[gentoo-x86]/net-wireless/bluez/bluez-4.99.ebuild
Gentoo

Contents of /net-wireless/bluez/bluez-4.99.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Wed Aug 22 12:25:16 2012 UTC (2 years, 1 month ago) by xmw
Branch: MAIN
Changes since 1.11: +2 -2 lines
ppc stable (bug 411015).

(Portage version: 2.1.11.10/cvs/Linux x86_64)

1 # Copyright 1999-2012 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.99.ebuild,v 1.11 2012/07/23 15:40:24 swift Exp $
4
5 EAPI="4"
6 PYTHON_DEPEND="test-programs? 2"
7
8 inherit multilib eutils systemd python user
9
10 DESCRIPTION="Bluetooth Tools and System Daemons for Linux"
11 HOMEPAGE="http://www.bluez.org/"
12
13 # Because of oui.txt changing from time to time without noticement, we need to supply it
14 # ourselves instead of using http://standards.ieee.org/regauth/oui/oui.txt directly.
15 # See bugs #345263 and #349473 for reference.
16 OUIDATE="20120308"
17 SRC_URI="mirror://kernel/linux/bluetooth/${P}.tar.xz
18 http://dev.gentoo.org/~pacho/bluez/oui-${OUIDATE}.txt.xz"
19
20 LICENSE="GPL-2 LGPL-2.1"
21 SLOT="0"
22 KEYWORDS="amd64 arm hppa ppc ~ppc64 x86"
23 IUSE="alsa caps +consolekit cups debug gstreamer pcmcia selinux test-programs usb readline"
24
25 CDEPEND="
26 >=dev-libs/glib-2.14:2
27 sys-apps/dbus
28 >=sys-fs/udev-169
29 <sys-fs/udev-185
30 alsa? (
31 media-libs/alsa-lib[alsa_pcm_plugins_extplug(+),alsa_pcm_plugins_ioplug(+)]
32 media-libs/libsndfile
33 )
34 caps? ( >=sys-libs/libcap-ng-0.6.2 )
35 cups? ( net-print/cups )
36 gstreamer? (
37 >=media-libs/gstreamer-0.10:0.10
38 >=media-libs/gst-plugins-base-0.10:0.10
39 )
40 selinux? ( sec-policy/selinux-bluetooth )
41 usb? ( virtual/libusb:0 )
42 readline? ( sys-libs/readline )
43 "
44 DEPEND="${CDEPEND}
45 virtual/pkgconfig
46 sys-devel/flex
47 test-programs? ( >=dev-libs/check-0.9.6 )
48 "
49 RDEPEND="${CDEPEND}
50 !net-wireless/bluez-libs
51 !net-wireless/bluez-utils
52 consolekit? (
53 || ( sys-auth/consolekit
54 >=sys-apps/systemd-37 )
55 )
56 test-programs? (
57 dev-python/dbus-python
58 dev-python/pygobject:2
59 )
60 "
61
62 DOCS=( AUTHORS ChangeLog README )
63
64 pkg_setup() {
65 if ! use consolekit; then
66 enewgroup plugdev
67 fi
68
69 if use test-programs; then
70 python_pkg_setup
71 fi
72 }
73
74 src_prepare() {
75 if ! use consolekit; then
76 # No consolekit for at_console etc, so we grant plugdev the rights
77 epatch "${FILESDIR}/bluez-plugdev.patch"
78 fi
79
80 if use cups; then
81 sed -i \
82 -e "s:cupsdir = \$(libdir)/cups:cupsdir = `cups-config --serverbin`:" \
83 Makefile.tools Makefile.in || die
84 fi
85 }
86
87 src_configure() {
88 use readline || export ac_cv_header_readline_readline_h=no
89
90 econf \
91 --enable-hid2hci \
92 --enable-audio \
93 --enable-bccmd \
94 --enable-datafiles \
95 --enable-dfutool \
96 --enable-input \
97 --enable-network \
98 --enable-serial \
99 --enable-service \
100 --enable-tools \
101 --disable-hal \
102 --localstatedir=/var \
103 --with-systemdunitdir="$(systemd_get_unitdir)" \
104 $(use_enable alsa) \
105 $(use_enable caps capng) \
106 $(use_enable cups) \
107 $(use_enable debug) \
108 $(use_enable gstreamer) \
109 $(use_enable pcmcia) \
110 $(use_enable test-programs test) \
111 $(use_enable usb) \
112 --enable-health \
113 --enable-maemo6 \
114 --enable-pnat \
115 --enable-wiimote
116 }
117
118 src_install() {
119 default
120
121 if use test-programs ; then
122 cd "${S}/test"
123 dobin simple-agent simple-service monitor-bluetooth
124 newbin list-devices list-bluetooth-devices
125 rm test-textfile.{c,o} || die # bug #356529
126 for b in apitest hsmicro hsplay test-* ; do
127 newbin "${b}" "bluez-${b}"
128 done
129 insinto /usr/share/doc/${PF}/test-services
130 doins service-*
131
132 python_convert_shebangs -r 2 "${ED}"
133 cd "${S}"
134 fi
135
136 insinto /etc/bluetooth
137 doins \
138 input/input.conf \
139 audio/audio.conf \
140 network/network.conf \
141 serial/serial.conf
142
143 newinitd "${FILESDIR}/bluetooth-init.d-r1" bluetooth
144 newinitd "${FILESDIR}/rfcomm-init.d" rfcomm
145 newconfd "${FILESDIR}/rfcomm-conf.d" rfcomm
146
147 # Install oui.txt as requested in bug #283791 and approved by upstream
148 insinto /var/lib/misc
149 newins "${WORKDIR}/oui-${OUIDATE}.txt" oui.txt
150
151 find "${D}" -name "*.la" -delete
152 }
153
154 pkg_postinst() {
155 udevadm control --reload-rules && udevadm trigger --subsystem-match=bluetooth
156
157 if ! has_version "net-dialup/ppp"; then
158 elog "To use dial up networking you must install net-dialup/ppp."
159 fi
160
161 if use consolekit; then
162 elog "If you want to use rfcomm as a normal user, you need to add the user"
163 elog "to the uucp group."
164 else
165 elog "Since you have the consolekit use flag disabled, you will only be able to run"
166 elog "bluetooth clients as root. If you want to be able to run bluetooth clientes as "
167 elog "a regular user, you need to enable the consolekit use flag for this package or"
168 elog "to add the user to the plugdev group."
169 fi
170
171 if [ "$(rc-config list default | grep bluetooth)" = "" ] ; then
172 elog "You will need to add bluetooth service to default runlevel"
173 elog "for getting your devices detected from startup without needing"
174 elog "to reconnect them. For that please run:"
175 elog "'rc-update add bluetooth default'"
176 fi
177 }

  ViewVC Help
Powered by ViewVC 1.1.20