1 # Maintainer: Arturo Martinez
3 pkgname=bluez-git-wiimote
6 pkgdesc="Libraries and tools for the Bluetooth protocol stack"
8 url="http://www.bluez.org/"
12 makedepends=('gstreamer0.10-base' 'libusb-compat' 'libnl' 'libsndfile')
13 optdepends=("gstreamer0.10-base: bluetooth GStreamer support"
14 "alsa-lib: Audio bluetooth devices support"
15 "dbus-python: to run bluez-simple-agent"
16 "pygobject: to run bluez-simple-agent"
17 "libusb-compat: USB adapters support"
19 "libnl: netlink plugin")
21 conflicts=('bluez' 'bluez-libs' 'bluez-utils')
22 provides=('bluez=4.97' 'bluez-libs' 'bluez-utils')
23 replaces=('bluez' 'bluez-libs' 'bluez-utils')
25 options=('!libtool' 'emptydirs')
26 backup=(etc/bluetooth/{main,rfcomm,audio,network,input,serial}.conf
27 'etc/conf.d/bluetooth' 'etc/dbus-1/system.d/bluetooth.conf')
28 source=('bluetooth.conf.d'
29 'rc.bluetooth' '0001-Fix-wiimote-device_get_address-to-use-new-API.patch'
30 '0002-Detect-Wii-Remotes-by-device-name.patch' )
31 md5sums=('7412982b440f29fa7f76a41a87fef985'
32 '8f9498707f809506928b2e480d3b6789'
33 '1e98cc7494b375152ad0d97fd77ddd45'
34 'af9cfa5ce79201510a9bfbda6e7ed71e')
36 _gitroot="git://git.kernel.org/pub/scm/bluetooth/bluez.git"
41 msg "Connecting to GIT server...."
43 if [ -d ${srcdir}/${_gitname} ] ; then
44 cd ${_gitname} && git pull origin
45 msg "The local files are updated."
50 msg "GIT checkout done or server timeout"
51 msg "Starting make..."
54 cd ${srcdir}/${_gitname}
55 patch -p1 -i $srcdir/0001-Fix-wiimote-device_get_address-to-use-new-API.patch || return 1
56 patch -p1 -i $srcdir/0002-Detect-Wii-Remotes-by-device-name.patch || return 1
58 ./bootstrap || return 1
59 ./configure --prefix=/usr \
61 --localstatedir=/var \
79 cd ${srcdir}/${_gitname}
80 make DESTDIR=${pkgdir} install || return 1
82 install -Dm755 ${srcdir}/rc.bluetooth ${pkgdir}/etc/rc.d/bluetooth
84 install -d ${pkgdir}/etc/bluetooth
85 install -m644 network/network.conf \
89 ${pkgdir}/etc/bluetooth/
91 install -Dm644 ${srcdir}/bluetooth.conf.d \
92 ${pkgdir}/etc/conf.d/bluetooth
95 install -Dm755 test/simple-agent "${pkgdir}"/usr/bin/bluez-simple-agent
96 install -Dm755 test/test-device "${pkgdir}"/usr/bin/bluez-test-device
97 install -Dm755 test/test-input "${pkgdir}"/usr/bin/bluez-test-input
98 sed -i 's#/usr/bin/python#/usr/bin/python2#' \
99 "${pkgdir}"/usr/bin/bluez-simple-agent \
100 "${pkgdir}"/usr/bin/bluez-test-device \
101 "${pkgdir}"/usr/bin/bluez-test-input
103 # http://mailman.archlinux.org/pipermail/arch-general/2011-April/019787.html
104 rm "${pkgdir}"/lib/udev/rules.d/97-bluetooth.rules