archrelease: copy trunk to extra-x86_64
[arch-packages.git] / bluez / repos / extra-x86_64 / PKGBUILD
blob45696f89a75b332c0a67266544a3aece8194cc01
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.63
9 pkgrel=1
10 url="http://www.bluez.org/"
11 arch=('x86_64')
12 license=('GPL2')
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}
15         bluetooth.modprobe
17 # see https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc
18 sha256sums=('9349e11e8160bb3d720835d271250d8a7424d3690f5289e6db6fe07cc66c6d76'
19             'SKIP'
20             '46c021be659c9a1c4e55afd04df0c059af1f3d98a96338236412e449bf7477b4')
21 validpgpkeys=('E932D120BC2AEC444E558F0106CA9F5D1DCF2659') # Marcel Holtmann <marcel@holtmann.org>
23 build() {
24   cd "${pkgname}"-${pkgver}
25   ./configure \
26           --prefix=/usr \
27           --mandir=/usr/share/man \
28           --sysconfdir=/etc \
29           --localstatedir=/var \
30           --libexecdir=/usr/lib \
31           --with-dbusconfdir=/usr/share \
32           --enable-btpclient \
33           --enable-midi \
34           --enable-sixaxis \
35           --enable-mesh \
36           --enable-hid2hci \
37           --enable-experimental \
38           --enable-library # this is deprecated
39   make
42 check() {
43   cd "$pkgname"-$pkgver
44   # tests segfault and hang
45 #  make check || /bin/true # https://bugzilla.kernel.org/show_bug.cgi?id=196621
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 -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
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
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}" \
94        install-binPROGRAMS \
95        install-dist_zshcompletionDATA \
96        install-man1
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
102   done
103   
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
108   
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"
115   depends=('glibc')
116   provides=('libbluetooth.so')
117   license=('LGPL2.1')
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"
128   depends=('cups')
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"
136   depends=('systemd')
138   cd "${pkgbase}"-${pkgver}
139   make DESTDIR=${pkgdir} \
140        install-udevPROGRAMS \
141        install-rulesDATA
142   
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)"
149   depends=('systemd')
151   cd "${pkgbase}"-${pkgver}
152   make DESTDIR="${pkgdir}" \
153        install-pluginLTLIBRARIES