archrelease: copy trunk to extra-x86_64
[arch-packages.git] / bluez / repos / extra-x86_64 / PKGBUILD
blobf192993e42fe37dc023db3e94f022da96e4a65b4
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>
6 pkgbase=bluez
7 pkgname=('bluez' 'bluez-utils' 'bluez-libs' 'bluez-cups' 'bluez-hid2hci' 'bluez-plugins')
8 pkgver=5.66
9 pkgrel=1
10 url="http://www.bluez.org/"
11 arch=('x86_64')
12 license=('GPL2')
13 options=('debug')
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}
16         bluetooth.modprobe
18 # see https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc
19 sha256sums=('39fea64b590c9492984a0c27a89fc203e1cdc74866086efb8f4698677ab2b574'
20             'SKIP'
21             '46c021be659c9a1c4e55afd04df0c059af1f3d98a96338236412e449bf7477b4')
22 validpgpkeys=('E932D120BC2AEC444E558F0106CA9F5D1DCF2659') # Marcel Holtmann <marcel@holtmann.org>
24 build() {
25   cd "${pkgname}"-${pkgver}
26   ./configure \
27           --prefix=/usr \
28           --mandir=/usr/share/man \
29           --sysconfdir=/etc \
30           --localstatedir=/var \
31           --libexecdir=/usr/lib \
32           --with-dbusconfdir=/usr/share \
33           --enable-btpclient \
34           --enable-midi \
35           --enable-sixaxis \
36           --enable-mesh \
37           --enable-hid2hci \
38           --enable-experimental \
39           --enable-library # this is deprecated
40   make
43 check() {
44   cd "$pkgname"-$pkgver
45   make check
49 package_bluez() {
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 \
62        install-dbusDATA \
63        install-man8
65   # ship upstream main config file
66   install -dm555 "${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
79   
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
86   # cleanup  - these libs go into bluez-libs
87   rm "${pkgdir}"/usr/lib/libbluetooth.so*
90 package_bluez-utils() {
91   pkgdesc="Development and debugging utilities for the bluetooth protocol stack"
92   depends=('dbus' 'systemd' 'glib2')
93   optdepends=('ell: for btpclient')
94   backup=('etc/bluetooth/mesh-main.conf')
95   conflicts=('bluez-hcidump')
96   provides=('bluez-hcidump')
97   replaces=('bluez-hcidump' 'bluez<=4.101')
99   cd "${pkgbase}"-${pkgver}
100   make DESTDIR="${pkgdir}" \
101        install-binPROGRAMS \
102        install-dist_zshcompletionDATA \
103        install-man1
105   # add missing tools FS#41132, FS#41687, FS#42716
106   for files in `find tools/ -type f -perm -755`; do
107     filename=$(basename $files)
108     install -Dm755 "${srcdir}"/"${pkgbase}"-${pkgver}/tools/$filename "${pkgdir}"/usr/bin/$filename
109   done
110   
111   # ship upstream mesh config file
112   install -dm555 "${pkgdir}"/etc/bluetooth
113   install -Dm644 "${srcdir}"/"${pkgbase}"-${pkgver}/mesh/mesh-main.conf "${pkgdir}"/etc/bluetooth/mesh-main.conf
115   # libbluetooth.so* are part of libLTLIBRARIES and binPROGRAMS targets
116   #make DESTDIR=${pkgdir} uninstall-libLTLIBRARIES
117   #rmdir ${pkgdir}/usr/lib
118   rm -rf "${pkgdir}"/usr/lib
120   # move the hid2hci man page out
121   mv "${pkgdir}"/usr/share/man/man1/hid2hci.1 "${srcdir}"/
124 package_bluez-libs() {
125   pkgdesc="Deprecated libraries for the bluetooth protocol stack"
126   depends=('glibc')
127   provides=('libbluetooth.so')
128   license=('LGPL2.1')
130   cd "${pkgbase}"-${pkgver}
131   make DESTDIR="${pkgdir}" \
132        install-pkgincludeHEADERS \
133        install-libLTLIBRARIES \
134        install-pkgconfigDATA
137 package_bluez-cups() {
138   pkgdesc="CUPS printer backend for Bluetooth printers"
139   depends=('cups')
141   cd "${pkgbase}"-${pkgver}
142   make DESTDIR="${pkgdir}" install-cupsPROGRAMS
144   # cleanup  - these libs go into bluez-libs
145   rm "${pkgdir}"/usr/lib/libbluetooth.so*
148 package_bluez-hid2hci() {
149   pkgdesc="Put HID proxying bluetooth HCI's into HCI mode"
150   depends=('systemd')
152   cd "${pkgbase}"-${pkgver}
153   make DESTDIR=${pkgdir} \
154        install-udevPROGRAMS \
155        install-rulesDATA
156   
157   install -dm755 "${pkgdir}"/usr/share/man/man1
158   mv "${srcdir}"/hid2hci.1 "${pkgdir}"/usr/share/man/man1/hid2hci.1
160   # cleanup  - these libs go into bluez-libs
161   rm "${pkgdir}"/usr/lib/libbluetooth.so*
164 package_bluez-plugins() {
165   pkgdesc="bluez plugins (PS3 Sixaxis controller)"
166   depends=('systemd')
168   cd "${pkgbase}"-${pkgver}
169   make DESTDIR="${pkgdir}" \
170        install-pluginLTLIBRARIES
172   # cleanup  - these libs go into bluez-libs
173   rm "${pkgdir}"/usr/lib/libbluetooth.so*