updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / bluez-xbmc / PKGBUILD
blobd447c85e8d2a27bd469329884666499eeab5320c
1 # $Id$
2 # Maintainer:
3 # Contributor: Andrea Scarpino <andrea@archlinux.org>
4 # Contributor: Geoffroy Carrier <geoffroy@archlinux.org>
6 pkgname=bluez-xbmc
7 realname=bluez
8 pkgver=4.98
9 pkgrel=1
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')
13 license=('GPL2')
14 depends=('dbus-core')
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"
21         "cups: CUPS backend"
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"
30         'bluetooth.conf.d'
31         'rc.bluetooth'
32         'bluetooth.h.patch')
33 md5sums=('4aca8a0929250212e9a75fb60dd75b05'
34          '7412982b440f29fa7f76a41a87fef985'
35          '8f9498707f809506928b2e480d3b6789'
36          '59be7e17ff24c255ef83d060611bdec5')
38 build() {
39   cd "${srcdir}/${realname}-${pkgver}"
40   patch -p0 < "${srcdir}/bluetooth.h.patch"
42   ./configure --prefix=/usr \
43     --sysconfdir=/etc \
44     --localstatedir=/var \
45     --libexecdir=/lib \
46     --enable-gstreamer \
47     --enable-alsa \
48     --enable-usb \
49     --enable-tools \
50     --enable-bccmd \
51     --enable-dfutool \
52     --enable-hid2hci \
53     --enable-hidd \
54     --enable-pand \
55     --enable-dund \
56     --enable-cups \
57     --enable-wiimote \
58     --disable-test
59   make
62 package() {
63   cd ${srcdir}/${realname}-${pkgver}
64   make DESTDIR=${pkgdir} install
66   install -Dm755 ${srcdir}/rc.bluetooth ${pkgdir}/etc/rc.d/bluetooth
67   
68   install -d ${pkgdir}/etc/bluetooth
69   install -m644 network/network.conf \
70                 input/input.conf \
71                 audio/audio.conf \
72                 serial/serial.conf \
73     ${pkgdir}/etc/bluetooth/
74   
75   install -Dm644 ${srcdir}/bluetooth.conf.d \
76     ${pkgdir}/etc/conf.d/bluetooth
78   # FS#27630
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