1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
2 # Contributor: Tom Gundersen <teg@jklm.no>
3 # Contributor: Andrea Scarpino <andrea@archlinux.org>
4 # Contributor: Geoffroy Carrier <geoffroy@archlinux.org>
7 pkgname=('bluez' 'bluez-utils' 'bluez-libs' 'bluez-cups' 'bluez-hid2hci' 'bluez-plugins')
10 url="http://www.bluez.org/"
13 makedepends=('dbus' 'libical' 'systemd' 'alsa-lib' 'json-c' 'ell' 'python-docutils')
14 source=(https://www.kernel.org/pub/linux/bluetooth/${pkgname}-${pkgver}.tar.{xz,sign}
17 # see https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc
18 sha256sums=('9349e11e8160bb3d720835d271250d8a7424d3690f5289e6db6fe07cc66c6d76'
20 '46c021be659c9a1c4e55afd04df0c059af1f3d98a96338236412e449bf7477b4')
21 validpgpkeys=('E932D120BC2AEC444E558F0106CA9F5D1DCF2659') # Marcel Holtmann <marcel@holtmann.org>
24 cd "${pkgname}"-${pkgver}
27 --mandir=/usr/share/man \
29 --localstatedir=/var \
30 --libexecdir=/usr/lib \
31 --with-dbusconfdir=/usr/share \
37 --enable-experimental \
38 --enable-library # this is deprecated
44 # tests segfault and hang
45 # make check || /bin/true # https://bugzilla.kernel.org/show_bug.cgi?id=196621
50 pkgdesc="Daemons for the bluetooth protocol stack"
51 depends=('libical' 'dbus' 'glib2' 'alsa-lib' 'json-c')
52 backup=('etc/bluetooth/main.conf')
53 conflicts=('obexd-client' 'obexd-server')
55 cd "${pkgbase}"-${pkgver}
56 make DESTDIR=${pkgdir} \
57 install-pkglibexecPROGRAMS \
58 install-dbussessionbusDATA \
59 install-systemdsystemunitDATA \
60 install-systemduserunitDATA \
61 install-dbussystembusDATA \
65 # ship upstream main config file
66 install -dm755 "${pkgdir}"/etc/bluetooth
67 install -Dm644 "${srcdir}"/"${pkgbase}"-${pkgver}/src/main.conf "${pkgdir}"/etc/bluetooth/main.conf
69 # add basic documention
70 install -dm755 "${pkgdir}"/usr/share/doc/"${pkgbase}"/dbus-apis
71 cp -a doc/*.txt "${pkgdir}"/usr/share/doc/"${pkgbase}"/dbus-apis/
72 # fix module loading errors
73 install -dm755 "${pkgdir}"/usr/lib/modprobe.d
74 install -Dm644 "${srcdir}"/bluetooth.modprobe "${pkgdir}"/usr/lib/modprobe.d/bluetooth-usb.conf
75 # load module at system start required by some functions
76 # https://bugzilla.kernel.org/show_bug.cgi?id=196621
77 install -dm755 "$pkgdir"/usr/lib/modules-load.d
78 echo "crypto_user" > "$pkgdir"/usr/lib/modules-load.d/bluez.conf
80 # fix obex file transfer - https://bugs.archlinux.org/task/45816
81 ln -fs /usr/lib/systemd/user/obex.service "${pkgdir}"/usr/lib/systemd/user/dbus-org.bluez.obex.service
84 package_bluez-utils() {
85 pkgdesc="Development and debugging utilities for the bluetooth protocol stack"
86 depends=('dbus' 'systemd' 'glib2')
87 optdepends=('ell: for btpclient')
88 conflicts=('bluez-hcidump')
89 provides=('bluez-hcidump')
90 replaces=('bluez-hcidump' 'bluez<=4.101')
92 cd "${pkgbase}"-${pkgver}
93 make DESTDIR="${pkgdir}" \
95 install-dist_zshcompletionDATA \
98 # add missing tools FS#41132, FS#41687, FS#42716
99 for files in `find tools/ -type f -perm -755`; do
100 filename=$(basename $files)
101 install -Dm755 "${srcdir}"/"${pkgbase}"-${pkgver}/tools/$filename "${pkgdir}"/usr/bin/$filename
104 # libbluetooth.so* are part of libLTLIBRARIES and binPROGRAMS targets
105 #make DESTDIR=${pkgdir} uninstall-libLTLIBRARIES
106 #rmdir ${pkgdir}/usr/lib
107 rm -rf "${pkgdir}"/usr/lib
109 # move the hid2hci man page out
110 mv "${pkgdir}"/usr/share/man/man1/hid2hci.1 "${srcdir}"/
113 package_bluez-libs() {
114 pkgdesc="Deprecated libraries for the bluetooth protocol stack"
116 provides=('libbluetooth.so')
119 cd "${pkgbase}"-${pkgver}
120 make DESTDIR="${pkgdir}" \
121 install-pkgincludeHEADERS \
122 install-libLTLIBRARIES \
123 install-pkgconfigDATA
126 package_bluez-cups() {
127 pkgdesc="CUPS printer backend for Bluetooth printers"
130 cd "${pkgbase}"-${pkgver}
131 make DESTDIR="${pkgdir}" install-cupsPROGRAMS
134 package_bluez-hid2hci() {
135 pkgdesc="Put HID proxying bluetooth HCI's into HCI mode"
138 cd "${pkgbase}"-${pkgver}
139 make DESTDIR=${pkgdir} \
140 install-udevPROGRAMS \
143 install -dm755 "${pkgdir}"/usr/share/man/man1
144 mv "${srcdir}"/hid2hci.1 "${pkgdir}"/usr/share/man/man1/hid2hci.1
147 package_bluez-plugins() {
148 pkgdesc="bluez plugins (PS3 Sixaxis controller)"
151 cd "${pkgbase}"-${pkgver}
152 make DESTDIR="${pkgdir}" \
153 install-pluginLTLIBRARIES