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/"
14 makedepends=('dbus' 'libical' 'systemd' 'alsa-lib' 'json-c' 'ell' 'python-docutils')
15 source=(https://www.kernel.org/pub/linux/bluetooth/${pkgname}-${pkgver}.tar.{xz,sign}
18 # see https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc
19 sha256sums=('ae437e65b6b3070c198bc5b0109fe9cdeb9eaa387380e2072f9de65fe8a1de34'
21 '46c021be659c9a1c4e55afd04df0c059af1f3d98a96338236412e449bf7477b4')
22 validpgpkeys=('E932D120BC2AEC444E558F0106CA9F5D1DCF2659') # Marcel Holtmann <marcel@holtmann.org>
25 cd "${pkgname}"-${pkgver}
28 --mandir=/usr/share/man \
30 --localstatedir=/var \
31 --libexecdir=/usr/lib \
32 --with-dbusconfdir=/usr/share \
38 --enable-experimental \
39 --enable-library # this is deprecated
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
83 # FS#74157 - bluez systemd service fails without localstatedir present
84 install -dm700 "${pkgdir}"/var/lib/bluetooth
87 package_bluez-utils() {
88 pkgdesc="Development and debugging utilities for the bluetooth protocol stack"
89 depends=('dbus' 'systemd' 'glib2')
90 optdepends=('ell: for btpclient')
91 conflicts=('bluez-hcidump')
92 provides=('bluez-hcidump')
93 replaces=('bluez-hcidump' 'bluez<=4.101')
95 cd "${pkgbase}"-${pkgver}
96 make DESTDIR="${pkgdir}" \
98 install-dist_zshcompletionDATA \
101 # add missing tools FS#41132, FS#41687, FS#42716
102 for files in `find tools/ -type f -perm -755`; do
103 filename=$(basename $files)
104 install -Dm755 "${srcdir}"/"${pkgbase}"-${pkgver}/tools/$filename "${pkgdir}"/usr/bin/$filename
107 # libbluetooth.so* are part of libLTLIBRARIES and binPROGRAMS targets
108 #make DESTDIR=${pkgdir} uninstall-libLTLIBRARIES
109 #rmdir ${pkgdir}/usr/lib
110 rm -rf "${pkgdir}"/usr/lib
112 # move the hid2hci man page out
113 mv "${pkgdir}"/usr/share/man/man1/hid2hci.1 "${srcdir}"/
116 package_bluez-libs() {
117 pkgdesc="Deprecated libraries for the bluetooth protocol stack"
119 provides=('libbluetooth.so')
122 cd "${pkgbase}"-${pkgver}
123 make DESTDIR="${pkgdir}" \
124 install-pkgincludeHEADERS \
125 install-libLTLIBRARIES \
126 install-pkgconfigDATA
129 package_bluez-cups() {
130 pkgdesc="CUPS printer backend for Bluetooth printers"
133 cd "${pkgbase}"-${pkgver}
134 make DESTDIR="${pkgdir}" install-cupsPROGRAMS
137 package_bluez-hid2hci() {
138 pkgdesc="Put HID proxying bluetooth HCI's into HCI mode"
141 cd "${pkgbase}"-${pkgver}
142 make DESTDIR=${pkgdir} \
143 install-udevPROGRAMS \
146 install -dm755 "${pkgdir}"/usr/share/man/man1
147 mv "${srcdir}"/hid2hci.1 "${pkgdir}"/usr/share/man/man1/hid2hci.1
150 package_bluez-plugins() {
151 pkgdesc="bluez plugins (PS3 Sixaxis controller)"
154 cd "${pkgbase}"-${pkgver}
155 make DESTDIR="${pkgdir}" \
156 install-pluginLTLIBRARIES