3 # Contributor: Andrea Scarpino <andrea@archlinux.org>
4 # Contributor: Geoffroy Carrier <geoffroy@archlinux.org>
10 pkgdesc="Libraries and tools for the Bluetooth protocol stack. Same as extra-package, just added a patch for XBMC."
11 url="http://www.bluez.org/"
12 arch=('i686' 'x86_64')
15 makedepends=('gstreamer0.10-base' 'libusb-compat' 'libnl' 'libsndfile')
16 optdepends=("gstreamer0.10-base: bluetooth GStreamer support"
17 "alsa-lib: Audio bluetooth devices support"
18 "dbus-python: to run bluez-simple-agent"
19 "pygobject: to run bluez-simple-agent"
20 "libusb-compat: USB adapters support"
22 "libnl: netlink plugin")
23 conflicts=('bluez' 'bluez-libs' 'bluez-utils')
24 provides=('bluez' 'bluez-libs' 'bluez-utils')
25 replaces=('bluez' 'bluez-libs' 'bluez-utils')
26 options=('!libtool' 'emptydirs')
27 backup=(etc/bluetooth/{main,rfcomm,audio,network,input,serial}.conf
28 'etc/conf.d/bluetooth' 'etc/dbus-1/system.d/bluetooth.conf')
29 source=("http://www.kernel.org/pub/linux/bluetooth/${realname}-${pkgver}.tar.bz2"
33 md5sums=('4aca8a0929250212e9a75fb60dd75b05'
34 '7412982b440f29fa7f76a41a87fef985'
35 '8f9498707f809506928b2e480d3b6789'
36 '59be7e17ff24c255ef83d060611bdec5')
39 cd "${srcdir}/${realname}-${pkgver}"
40 patch -p0 < "${srcdir}/bluetooth.h.patch"
42 ./configure --prefix=/usr \
44 --localstatedir=/var \
63 cd ${srcdir}/${realname}-${pkgver}
64 make DESTDIR=${pkgdir} install
66 install -Dm755 ${srcdir}/rc.bluetooth ${pkgdir}/etc/rc.d/bluetooth
68 install -d ${pkgdir}/etc/bluetooth
69 install -m644 network/network.conf \
73 ${pkgdir}/etc/bluetooth/
75 install -Dm644 ${srcdir}/bluetooth.conf.d \
76 ${pkgdir}/etc/conf.d/bluetooth
79 install -Dm755 test/simple-agent "${pkgdir}"/usr/bin/bluez-simple-agent
80 install -Dm755 test/test-device "${pkgdir}"/usr/bin/bluez-test-device
81 install -Dm755 test/test-input "${pkgdir}"/usr/bin/bluez-test-input
82 sed -i 's#/usr/bin/python#/usr/bin/python2#' \
83 "${pkgdir}"/usr/bin/bluez-simple-agent \
84 "${pkgdir}"/usr/bin/bluez-test-device \
85 "${pkgdir}"/usr/bin/bluez-test-input
87 # http://mailman.archlinux.org/pipermail/arch-general/2011-April/019787.html
88 rm "${pkgdir}"/lib/udev/rules.d/97-bluetooth.rules