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

Contents of /net-wireless/bluez/bluez-4.98-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Mon Jul 23 15:40:24 2012 UTC (20 months, 3 weeks ago) by swift
Branch: MAIN
Changes since 1.10: +3 -2 lines
Adding optional policy on selinux bluetooth policy

(Portage version: 2.1.10.65/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.98-r2.ebuild,v 1.10 2012/07/06 12:29:54 ssuominen 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="20120113"
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:1 )
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 # Fix compilation problems against bluez, bug #403341
76 epatch "${FILESDIR}/${PN}-4.98-fix-header.patch"
77
78 # Fix needing to enable socket, bug #401065
79 epatch "${FILESDIR}/${PN}-4.98-fix-socket.patch"
80
81 if ! use consolekit; then
82 # No consolekit for at_console etc, so we grant plugdev the rights
83 epatch "${FILESDIR}/bluez-plugdev.patch"
84 fi
85
86 if use cups; then
87 sed -i \
88 -e "s:cupsdir = \$(libdir)/cups:cupsdir = `cups-config --serverbin`:" \
89 Makefile.tools Makefile.in || die
90 fi
91 }
92
93 src_configure() {
94 use readline || export ac_cv_header_readline_readline_h=no
95
96 econf \
97 --enable-hid2hci \
98 --enable-audio \
99 --enable-bccmd \
100 --enable-datafiles \
101 --enable-dfutool \
102 --enable-input \
103 --enable-network \
104 --enable-serial \
105 --enable-service \
106 --enable-tools \
107 --disable-hal \
108 --localstatedir=/var \
109 --with-systemdunitdir="$(systemd_get_unitdir)" \
110 $(use_enable alsa) \
111 $(use_enable caps capng) \
112 $(use_enable cups) \
113 $(use_enable debug) \
114 $(use_enable gstreamer) \
115 $(use_enable pcmcia) \
116 $(use_enable test-programs test) \
117 $(use_enable usb) \
118 --enable-health \
119 --enable-maemo6 \
120 --enable-pnat \
121 --enable-wiimote
122 }
123
124 src_install() {
125 default
126
127 if use test-programs ; then
128 cd "${S}/test"
129 dobin simple-agent simple-service monitor-bluetooth
130 newbin list-devices list-bluetooth-devices
131 rm test-textfile.{c,o} || die # bug #356529
132 for b in apitest hsmicro hsplay test-* ; do
133 newbin "${b}" "bluez-${b}"
134 done
135 insinto /usr/share/doc/${PF}/test-services
136 doins service-*
137
138 python_convert_shebangs -r 2 "${ED}"
139 cd "${S}"
140 fi
141
142 insinto /etc/bluetooth
143 doins \
144 input/input.conf \
145 audio/audio.conf \
146 network/network.conf \
147 serial/serial.conf
148
149 newinitd "${FILESDIR}/bluetooth-init.d-r1" bluetooth
150 newinitd "${FILESDIR}/rfcomm-init.d" rfcomm
151 newconfd "${FILESDIR}/rfcomm-conf.d" rfcomm
152
153 # Install oui.txt as requested in bug #283791 and approved by upstream
154 insinto /var/lib/misc
155 newins "${WORKDIR}/oui-${OUIDATE}.txt" oui.txt
156
157 find "${D}" -name "*.la" -delete
158 }
159
160 pkg_postinst() {
161 udevadm control --reload-rules && udevadm trigger --subsystem-match=bluetooth
162
163 if ! has_version "net-dialup/ppp"; then
164 elog "To use dial up networking you must install net-dialup/ppp."
165 fi
166
167 if use consolekit; then
168 elog "If you want to use rfcomm as a normal user, you need to add the user"
169 elog "to the uucp group."
170 else
171 elog "Since you have the consolekit use flag disabled, you will only be able to run"
172 elog "bluetooth clients as root. If you want to be able to run bluetooth clientes as "
173 elog "a regular user, you need to enable the consolekit use flag for this package or"
174 elog "to add the user to the plugdev group."
175 fi
176
177 if [ "$(rc-config list default | grep bluetooth)" = "" ] ; then
178 elog "You will need to add bluetooth service to default runlevel"
179 elog "for getting your devices detected from startup without needing"
180 elog "to reconnect them. For that please run:"
181 elog "'rc-update add bluetooth default'"
182 fi
183 }

  ViewVC Help
Powered by ViewVC 1.1.20