summaryrefslogtreecommitdiff
path: root/extra/bluez/PKGBUILD
blob: 422ba049bf945ebc35a1cbc152407a05b13927c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# $Id: PKGBUILD 187857 2013-06-07 09:24:54Z tomegun $
# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Geoffroy Carrier <geoffroy@archlinux.org>

pkgbase=bluez
pkgname=('bluez' 'bluez-utils' 'bluez-libs')
pkgver=5.5
pkgrel=2
url="http://www.bluez.org/"
arch=('i686' 'x86_64')
license=('GPL2')
makedepends=('libusb-compat' 'dbus' 'libical' 'systemd')
options=(!libtool)
source=("http://www.kernel.org/pub/linux/bluetooth/${pkgname}-${pkgver}.tar.bz2")

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  ./configure \
          --prefix=/usr \
          --mandir=/usr/share/man \
          --sysconfdir=/etc \
          --localstatedir=/var \
          --libexecdir=/usr/lib \
          --enable-library # this is deprecated

  make
}

package_bluez() {
  pkgdesc="Daemons for the bluetooth protocol stack"
  depends=('libical' 'dbus' 'glib2')
  optdepends=("cups: CUPS backend")
  backup=('etc/dbus-1/system.d/bluetooth.conf')
  conflicts=('obexd-client' 'obexd-server')

  cd ${srcdir}/${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install

  ### split out bluez-utils
  rm -rf "$srcdir/_utils"
  install -dm755 "$srcdir"/_utils/usr/share/man
  mv "$pkgdir"/usr/share/man/man1 "$srcdir"/_utils/usr/share/man/
  install -dm755 "$srcdir"/_utils/usr/bin
  mv "$pkgdir"/usr/bin/{bccmd,ciptool,hciattach,hciconfig,hcidump,hcitool,l2ping,l2test,rctest,rfcomm,sdptool}\
          "$srcdir"/_utils/usr/bin/
  install -dm755 "$srcdir"/_utils/usr/lib
  mv "$pkgdir"/usr/lib/udev "$srcdir"/_utils/usr/lib/

  ### split out bluez-libs
  rm -rf "$srcdir/_libs"
  install -dm755 "$srcdir"/_libs/usr/lib/
  mv "$pkgdir"/usr/lib/{pkgconfig,libbluetooth*} \
          "$srcdir"/_libs/usr/lib/
  mv "$pkgdir"/usr/include \
          "$srcdir"/_libs/usr/
}

package_bluez-libs() {
  pkgdesc="Deprecated libraries for the bluetooth protocol stack"
  depends=('glibc')

  mv "$srcdir/_libs"/* "$pkgdir"
}
package_bluez-utils() {
  pkgdesc="Development and debugging utilities for the bluetooth protocol stack"
  depends=('systemd' 'libusb-compat')
  conflicts=('bluez-hcidump')
  provides=('bluez-hcidump')
  replaces=('bluez-hcidump')

  mv "$srcdir/_utils"/* "$pkgdir"
}
md5sums=('cfe6bd2f7f3f45f689b3a21a6ba59edd')